2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-30 05:48:07 +00:00

(marius) optimization

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2182 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Marius Reiner 2003-12-16 00:49:59 +00:00
parent 7baac5cdef
commit 324c738f9c

View File

@ -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