From 324c738f9c3efd38c632387bad26b69ac1dc92c0 Mon Sep 17 00:00:00 2001 From: Marius Reiner Date: Tue, 16 Dec 2003 00:49:59 +0000 Subject: [PATCH] (marius) optimization git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2182 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 97937d16..837e9f93 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 "((10/(${maxt}-${mint})*(${tval}-${mint}))^2/100*(255-${minso})+${minso})" |cut -d'.' -f1` + pwmval=`calc "(((${maxt}-${mint})*(${tval}-${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