diff --git a/prog/pwm/fancontrol b/prog/pwm/fancontrol index 837e9f93..fcd542f0 100755 --- a/prog/pwm/fancontrol +++ b/prog/pwm/fancontrol @@ -141,7 +141,7 @@ function UpdateFanSpeeds { then pwmval=255 # at specified maxtemp switch to 100% else # calculate the new value from temperature and settings - pwmval=`calc "(((${maxt}-${mint})*(${tval}-${mint}))^2*(255-${minso})+${minso})" |cut -d'.' -f1` + pwmval=`calc "(((${tval}-${mint})/(${maxt}-${mint}))^2*(255-${minso})+${minso})" |cut -d'.' -f1` if [ $pwmpval -eq 0 ] then # if fan was stopped start it using a safe value echo $minsa > $pwmo