From 329d868cb0a6d032ae65004afee5ac0f1b75033d Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Wed, 8 Jun 2022 00:10:48 +0300 Subject: reverse temp priorities --- armbian-envtemp-cpufreq.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'armbian-envtemp-cpufreq.sh') diff --git a/armbian-envtemp-cpufreq.sh b/armbian-envtemp-cpufreq.sh index a4513ba..5557ee0 100644 --- a/armbian-envtemp-cpufreq.sh +++ b/armbian-envtemp-cpufreq.sh @@ -100,8 +100,8 @@ envtemp=$(echo "$response" | jq ".temp" | awk "{print int(\$1+0.5)}") # setting corresponding cpu freq while read temp; do freq=${values[$temp]} - (( envtemp >= temp )) && break -done < <(for temp in ${!values[@]}; do echo $temp; done | sort -rn) + (( envtemp <= temp )) && break +done < <(for temp in ${!values[@]}; do echo $temp; done | sort -n) echo -n "$freq" > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq logger -t "$(basename "$PROGNAME")" "Environment temperature is $envtemp C, set max CPU frequency to $freq." -- cgit v1.2.3