Fix MINSTOP and MINSTART test functions. PWM must be enabled for the duration

of the test, and disabled again afterwards. Bug reported by Philippe Roubach.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5318 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2008-09-08 09:49:13 +00:00
1 parent f9dbe31f15
commit 1bf9b248b0
2 files changed
+11 -4

No files matched your search

+1
View File
@@ -5,6 +5,7 @@ SVN-HEAD
libsensors: Avoid namespace pollution
fancontrol: Don't use named pipes when we don't need them (#2319)
pwmconfig: Tell the user about gnuplot if isn't installed
Fix MINSTOP and MINSTART test functions
sensors-detect: Add Intel SCH (bus) support
Add SMSC EMC6D103 support
Improve MAX6657, MAX6658, MAX6659 detection
+10 -4
View File
@@ -577,19 +577,22 @@ function TestMinStart {
echo 'We will use this value +20 as the starting speed.'
let fanok=0
let fanval=0
pwmenable $pwms
until [ "$fanok" = "1" ]
do
let fanval=fanval+10
if [ $fanval -gt 240 ] ; then let fanval=$MAX ; let fanok=1 ; fi
echo -n "Setting $pwms to $fanval..."
echo $fanval > $pwms
pwmset $pwms $fanval
read FANTEST
if [ "$FANTEST" != "" ] ; then let fanok=1 ; fi
done
pwmdisable $pwms
let fanval=fanval+20
if [ $fanval -gt 240 ] ; then let fanval=$MAX ; fi
echo "OK, using $fanval"
echo $MAX > $pwms
}
function TestMinStop {
@@ -600,19 +603,22 @@ function TestMinStop {
echo 'We will use this value +20 as the minimum speed.'
let fanok=0
let fanval=$MAX
pwmenable $pwms
until [ "$fanok" = "1" ]
do
let fanval=fanval-10
if [ $fanval -lt 0 ] ; then let fanval=0 ; let fanok=1 ; fi
echo -n "Setting $pwms to $fanval..."
echo $fanval > $pwms
pwmset $pwms $fanval
read FANTEST
if [ "$FANTEST" != "" ] ; then let fanok=1 ; fi
done
pwmdisable $pwms
let fanval=fanval+20
if [ $fanval -gt $MAX ] ; then let fanval=$MAX ; fi
echo "OK, using $fanval"
echo $MAX > $pwms
}
function SaveConfig {