Only write integer values to pwm files.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4591 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2007-07-08 11:17:26 +00:00
1 parent cd0b8c3489
commit 982afbce24
1 file changed
+3 -1
+3 -1
View File
@@ -45,6 +45,8 @@ MAX=255
echo $$ > /var/run/fancontrol.pid
declare -i pwmval
function LoadConfig {
echo "Loading configuration from $1 ..."
# grep configuration from file
@@ -324,7 +326,7 @@ function UpdateFanSpeeds {
then pwmval=$maxpwm # over max temp, use defined max pwm
else
# calculate the new value from temperature and settings
let pwmval="(${tval}-${mint})*(${maxpwm}-${minso})/(${maxt}-${mint})+${minso}"
pwmval="(${tval}-${mint})*(${maxpwm}-${minso})/(${maxt}-${mint})+${minso}"
if [ $pwmpval -eq 0 -o $fanval -eq 0 ]
then # if fan was stopped start it using a safe value
echo $minsa > $pwmo