From 334c9446f5c9b42db087bcec37491e7568799383 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 29 Jan 2009 08:13:47 +0000 Subject: [PATCH] Don't round temperature values. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5629 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + prog/pwm/fancontrol | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index d1846c83..95d1c108 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,7 @@ SVN-HEAD Drop support for kernels 2.4 and earlier lm_sensors.init.suse: Delete (actual SuSE script is much different) Makefile: Install sensors.conf.default instead of sensors.conf.eg (#2333) + fancontrol: Don't round temperature values maxilife scripts: Delete (driver never ported to Linux 2.6) sensord: Accept negative temperatures in RRD database Don't bail out on transient errors (#2330) diff --git a/prog/pwm/fancontrol b/prog/pwm/fancontrol index aca7b2c9..6aad3c17 100755 --- a/prog/pwm/fancontrol +++ b/prog/pwm/fancontrol @@ -2,7 +2,7 @@ # # Simple script implementing a temperature dependent fan speed control # -# Version 0.67 +# Version 0.68 # # Usage: fancontrol [CONFIGFILE] # @@ -18,7 +18,7 @@ # # # Copyright 2003 Marius Reiner -# Copyright (C) 2007-2008 Jean Delvare +# Copyright (C) 2007-2009 Jean Delvare # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -267,8 +267,8 @@ function UpdateFanSpeeds { pwmo=${AFCPWM[$fcvcount]} tsens=${AFCTEMP[$fcvcount]} fan=${AFCFAN[$fcvcount]} - mint=${AFCMINTEMP[$fcvcount]} - maxt=${AFCMAXTEMP[$fcvcount]} + let mint="${AFCMINTEMP[$fcvcount]}*1000" + let maxt="${AFCMAXTEMP[$fcvcount]}*1000" minsa=${AFCMINSTART[$fcvcount]} minso=${AFCMINSTOP[$fcvcount]} minpwm=${AFCMINPWM[$fcvcount]} @@ -280,11 +280,10 @@ function UpdateFanSpeeds { echo "Error reading temperature from $DIR/$tsens" restorefans 1 fi - if [ "$SYSFS" = "1" ] + if [ "$SYSFS" != "1" ] then - let tval="($tval+500)/1000" - else tval=`echo ${tval} | cut -d' ' -f3 | cut -d'.' -f1` + let tval="${tval}*1000" fi read pwmpval < ${pwmo}