diff --git a/cmd/fan/fan.go b/cmd/fan/fan.go index aacb2e2..39ab1cb 100644 --- a/cmd/fan/fan.go +++ b/cmd/fan/fan.go @@ -18,7 +18,7 @@ const ( ) const ( - POLL_INTERVAL = "10s" + POLL_INTERVAL = "30s" SPEED_TWENTY_FIVE_PERCENT_TEMP = 45.00 SPEED_FIFTY_PERCENT_TEMP = 50.00 SPEED_SEVENTY_FIVE_PERCENT_TEMP = 52.00 @@ -58,36 +58,27 @@ func main() { cpuTemp := utils.GetCPUTemp() gpuTemp := utils.GetGPUTemp() - log.Printf("CPU Temp : %.2f", cpuTemp) - log.Printf("GPU Temp : %.2f", gpuTemp) - if cpuTemp >= SPEED_FULL_TEMP || gpuTemp >= SPEED_FULL_TEMP { fan.SetSpeed(100) - log.Print("Setting fan speed to 100%") continue } if cpuTemp >= SPEED_SEVENTY_FIVE_PERCENT_TEMP || gpuTemp >= SPEED_SEVENTY_FIVE_PERCENT_TEMP { fan.SetSpeed(75) - log.Print("Setting fan speed to 75%") continue } if cpuTemp >= SPEED_FIFTY_PERCENT_TEMP || gpuTemp >= SPEED_FIFTY_PERCENT_TEMP { fan.SetSpeed(50) - log.Print("Setting fan speed to 50%") continue } if cpuTemp >= SPEED_TWENTY_FIVE_PERCENT_TEMP || gpuTemp >= SPEED_TWENTY_FIVE_PERCENT_TEMP { fan.SetSpeed(25) - log.Print("Setting fan speed to 25%") continue } if cpuTemp < SPEED_TWENTY_FIVE_PERCENT_TEMP || gpuTemp < SPEED_TWENTY_FIVE_PERCENT_TEMP { - fan.SetSpeed(0) - log.Print("Setting fan speed to 0%") + fan.SetSpeed(10) continue } // We should never get here but... - log.Print("Shouldn't see this but here we are") fan.SetSpeed(100) } }