Tweaks for fan service to keep it offline more frequently and scale up faster ; wil adjust polling interval after further testing and verification

This commit is contained in:
KemoNine 2020-09-04 15:20:15 -04:00
parent 6c6bbe02fe
commit 80828aa021
1 changed files with 6 additions and 7 deletions

View File

@ -18,12 +18,11 @@ const (
)
const (
POLL_INTERVAL = "1m"
SPEED_OFF_TEMP = 40.0
SPEED_TWENTY_FIVE_PERCENT_TEMP = 45.0
SPEED_FIFTY_PERCENT_TEMP = 50.0
SPEED_SEVENTY_FIVE_PERCENT_TEMP = 55.0
SPEED_FULL_TEMP = 57.0
POLL_INTERVAL = "10s"
SPEED_TWENTY_FIVE_PERCENT_TEMP = 45.00
SPEED_FIFTY_PERCENT_TEMP = 50.00
SPEED_SEVENTY_FIVE_PERCENT_TEMP = 52.00
SPEED_FULL_TEMP = 55.00
)
func main() {
@ -82,7 +81,7 @@ func main() {
log.Print("Setting fan speed to 25%")
continue
}
if cpuTemp <= SPEED_OFF_TEMP || gpuTemp <= SPEED_OFF_TEMP {
if cpuTemp < SPEED_TWENTY_FIVE_PERCENT_TEMP || gpuTemp < SPEED_TWENTY_FIVE_PERCENT_TEMP {
fan.SetSpeed(0)
log.Print("Setting fan speed to 0%")
continue