2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 14:25:39 +00:00

(marius) bugfix

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2183 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Marius Reiner
2003-12-16 00:58:46 +00:00
parent 324c738f9c
commit 77d38d9fe9

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 "(((${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