From 77d38d9fe91be742cb9008d38001b4a77ae7fdbf Mon Sep 17 00:00:00 2001 From: Marius Reiner Date: Tue, 16 Dec 2003 00:58:46 +0000 Subject: [PATCH] (marius) bugfix git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2183 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/pwm/fancontrol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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