mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-06-16 05:55:33 +00:00
add amd cpu suport
This commit is contained in:
parent
3aea945277
commit
fa62c65526
@ -33,7 +33,7 @@ import (
|
|||||||
func InitFunction() {
|
func InitFunction() {
|
||||||
go InitNetworkMount()
|
go InitNetworkMount()
|
||||||
go InitInfo()
|
go InitInfo()
|
||||||
go InitZerotier()
|
//go InitZerotier()
|
||||||
}
|
}
|
||||||
|
|
||||||
func InitInfo() {
|
func InitInfo() {
|
||||||
|
@ -473,6 +473,7 @@ func GetCPUThermalZone() string {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cache.SetDefault(keyName, path)
|
Cache.SetDefault(keyName, path)
|
||||||
return path
|
return path
|
||||||
}
|
}
|
||||||
@ -483,8 +484,11 @@ func (s *systemService) GetCPUTemperature() int {
|
|||||||
if len(path) > 0 {
|
if len(path) > 0 {
|
||||||
outPut = string(file.ReadFullFile(path + "/temp"))
|
outPut = string(file.ReadFullFile(path + "/temp"))
|
||||||
} else {
|
} else {
|
||||||
|
outPut = string(file.ReadFullFile("/sys/class/hwmon/hwmon0/temp1_input"))
|
||||||
|
if len(outPut) == 0 {
|
||||||
outPut = "0"
|
outPut = "0"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
celsius, _ := strconv.Atoi(strings.TrimSpace(outPut))
|
celsius, _ := strconv.Atoi(strings.TrimSpace(outPut))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user