mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-18 19:30:54 +00:00
Test MINSTOP before MINSTART. We know that MINSTART can't be less than
MINSTOP, so we can use MINSTOP as the initial value for the MINSTART test. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5323 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
01e44478ce
commit
5f9008ddf3
2 files changed
+32
-30
No files matched your search
@@ -6,6 +6,7 @@ SVN-HEAD
|
||||
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
|
||||
Test MINSTOP before MINSTART
|
||||
sensors-detect: Add Intel SCH (bus) support
|
||||
Add SMSC EMC6D103 support
|
||||
Improve MAX6657, MAX6658, MAX6659 detection
|
||||
|
||||
+31
-30
@@ -575,6 +575,7 @@ function LoadConfig()
|
||||
|
||||
LoadConfig $FCCONFIG
|
||||
|
||||
# $1 = pwm value below which the fan is stopped
|
||||
function TestMinStart()
|
||||
{
|
||||
echo
|
||||
@@ -583,17 +584,17 @@ function TestMinStart()
|
||||
echo "fan starts spinning. Then enter 'y'."
|
||||
echo 'We will use this value +20 as the starting speed.'
|
||||
let fanok=0
|
||||
let fanval=0
|
||||
let fanval="$1"
|
||||
|
||||
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..."
|
||||
pwmset $pwms $fanval
|
||||
read FANTEST
|
||||
if [ "$FANTEST" != "" ] ; then let fanok=1 ; fi
|
||||
let fanval=fanval+10
|
||||
done
|
||||
pwmdisable $pwms
|
||||
|
||||
@@ -768,44 +769,44 @@ select pwms in $pwmactive "Change INTERVAL" "Just quit" "Save and quit" "Show co
|
||||
fi
|
||||
echo
|
||||
echo "Enter the minimum PWM value (0-$MAX)"
|
||||
echo -n "at which the fan STARTS spinning (press t to test) ($DEFMINSTART): "
|
||||
read XMV
|
||||
if [ "$XMV" = "" ]
|
||||
then
|
||||
XMV=$DEFMINSTART
|
||||
fi
|
||||
if [ "$XMV" = "t" -o "$XMV" = "T" ]
|
||||
then
|
||||
TestMinStart
|
||||
XMV=$fanval
|
||||
fi
|
||||
if [ "$MINSTART" = "" ]
|
||||
then
|
||||
MINSTART="${pwms}=${XMV}"
|
||||
else
|
||||
MINSTART="`echo $MINSTART | sed -e "s/${pwmsed}[^ ]* *//g"` ${pwms}=${XMV}"
|
||||
fi
|
||||
echo
|
||||
echo "Enter the minimum PWM value (0-$MAX)"
|
||||
echo -n "at which the fan STOPS spinning (press t to test) ($DEFMINSTOP): "
|
||||
read XMV
|
||||
if [ "$XMV" = "" ]
|
||||
read XMSTOP
|
||||
if [ "$XMSTOP" = "" ]
|
||||
then
|
||||
XMV=$DEFMINSTOP
|
||||
XMSTOP=$DEFMINSTOP
|
||||
fi
|
||||
if [ "$XMV" = "t" -o "$XMV" = "T" ]
|
||||
if [ "$XMSTOP" = "t" -o "$XMSTOP" = "T" ]
|
||||
then
|
||||
TestMinStop
|
||||
XMV=$fanval
|
||||
XMSTOP=$fanval
|
||||
fi
|
||||
if [ "$MINSTOP" = "" ]
|
||||
then
|
||||
MINSTOP="${pwms}=${XMV}"
|
||||
MINSTOP="${pwms}=${XMSTOP}"
|
||||
else
|
||||
MINSTOP="`echo $MINSTOP | sed -e "s/${pwmsed}[^ ]* *//g"` ${pwms}=${XMV}"
|
||||
MINSTOP="`echo $MINSTOP | sed -e "s/${pwmsed}[^ ]* *//g"` ${pwms}=${XMSTOP}"
|
||||
fi
|
||||
echo
|
||||
echo "Enter the PWM value (0-$XMV) to use when the temperature"
|
||||
echo "Enter the minimum PWM value ($XMSTOP-$MAX)"
|
||||
echo -n "at which the fan STARTS spinning (press t to test) ($DEFMINSTART): "
|
||||
read XMSTART
|
||||
if [ "$XMSTART" = "" ]
|
||||
then
|
||||
XMSTART=$DEFMINSTART
|
||||
fi
|
||||
if [ "$XMSTART" = "t" -o "$XMSTART" = "T" ]
|
||||
then
|
||||
TestMinStart $XMSTOP
|
||||
XMSTART=$fanval
|
||||
fi
|
||||
if [ "$MINSTART" = "" ]
|
||||
then
|
||||
MINSTART="${pwms}=${XMSTART}"
|
||||
else
|
||||
MINSTART="`echo $MINSTART | sed -e "s/${pwmsed}[^ ]* *//g"` ${pwms}=${XMSTART}"
|
||||
fi
|
||||
echo
|
||||
echo "Enter the PWM value (0-$XMSTOP) to use when the temperature"
|
||||
echo -n "is below the low temperature limit (0): "
|
||||
read XMINP
|
||||
if [ -n "$XMINP" ]
|
||||
@@ -818,7 +819,7 @@ select pwms in $pwmactive "Change INTERVAL" "Just quit" "Save and quit" "Show co
|
||||
fi
|
||||
fi
|
||||
echo
|
||||
echo "Enter the PWM value ($XMV-$MAX) to use when the temperature"
|
||||
echo "Enter the PWM value ($XMSTOP-$MAX) to use when the temperature"
|
||||
echo -n "is over the high temperature limit ($MAX): "
|
||||
read XMAXP
|
||||
if [ -n "$XMAXP" ]
|
||||
|
||||
Reference in new issue
Block a user