From ad1d30b5251ada42964b815120d0e59590dc4608 Mon Sep 17 00:00:00 2001 From: Alex Hyett Date: Fri, 19 Apr 2024 16:13:39 +0100 Subject: [PATCH] Fix numbering --- cpufan.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpufan.sh b/cpufan.sh index ce690ef..7129bdb 100644 --- a/cpufan.sh +++ b/cpufan.sh @@ -18,6 +18,7 @@ sleep_time=9 while [ $i -lt 6 ]; do # 6 ten-second intervals in 1 minute PREVIOUS_SPEED=`cat $CPU_FAN` CPU_TEMP=`sensors coretemp-isa-0000 | grep "CPU Temp" | grep -o '[0-9]*' | head -1` + CPU_TEMP=$((CPU_TEMP)) # Convert to Number echo "CPU Temp: "$CPU_TEMP"" @@ -27,7 +28,7 @@ while [ $i -lt 6 ]; do # 6 ten-second intervals in 1 minute NEW_PWM=$((FAN_HIGH_PWM)) elif ((CPU_TEMP >= 30 && CPU_TEMP < 35)); then NEW_PWM=$((FAN_LOW_PWM + 35)) - elif ((CPU_TEMP >= 35 && CPU_TEMP < 40)); then + elif ((CPU_TEMP >= 35 && $CPU_TEMP < 40)); then NEW_PWM=$((FAN_LOW_PWM + 35*2)) elif ((CPU_TEMP >= 40 && CPU_TEMP < 50)); then NEW_PWM=$((FAN_LOW_PWM + 35*3))