Changeset 5328

Show
Ignore:
Timestamp:
09/09/08 15:15:04 (5 years ago)
Author:
khali
Message:

Skip MINSTOP and MINSTART tests if fan can't stop.

Location:
lm-sensors/branches/lm-sensors-3.0.0
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/CHANGES

    r5327 r5328  
    1212             Detect and report obviously incorrect fan speeds 
    1313             Determine MINSTOP automatically 
     14             Skip MINSTOP and MINSTART tests if fan can't stop 
    1415  sensors-detect: Add Intel SCH (bus) support 
    1516                  Add SMSC EMC6D103 support 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/pwmconfig

    r5327 r5328  
    454454                                pwmactive="$i ${pwmactive}" 
    455455                                fanactive="$j ${fanactive}" 
     456                                fanactive_min="$S ${fanactive_min}" 
    456457                        else 
    457458                                fanactive="$j+${fanactive}" #not supported yet by fancontrol 
     459                                fanactive_min="$S+${fanactive_min}" 
    458460                        fi 
    459461                        sleep $DELAY 
     
    757759                done 
    758760                FAN=`echo $fanactive|cut -d' ' -f$REPLY` 
     761                FAN_MIN=`echo $fanactive_min|cut -d' ' -f$REPLY` 
    759762                FCFANS="`echo $FCFANS | sed -e "s/${pwmsed}[^ ]* *//g"` ${pwms}=$FAN" 
    760763                echo 
     
    801804                                MAXTEMP="`echo $MAXTEMP | sed -e "s/${pwmsed}[^ ]* *//g"` ${pwms}=${XMT}" 
    802805                        fi 
    803                         echo 
    804                         echo "Enter the minimum PWM value (0-$MAX)" 
    805                         echo -n "at which the fan STOPS spinning (press t to test) ($DEFMINSTOP): " 
    806                         read XMSTOP 
    807                         if [ "$XMSTOP" = "" ] 
    808                         then 
    809                                 XMSTOP=$DEFMINSTOP 
    810                         fi 
    811                         if [ "$XMSTOP" = "t" -o "$XMSTOP" = "T" ] 
    812                         then 
    813                                 TestMinStop $FAN 
    814                                 XMSTOP=$fanval 
     806 
     807                        if [ $FAN_MIN -eq 0 ] 
     808                        then 
     809                                echo 
     810                                echo "Enter the minimum PWM value (0-$MAX)" 
     811                                echo -n "at which the fan STOPS spinning (press t to test) ($DEFMINSTOP): " 
     812                                read XMSTOP 
     813 
     814                                if [ "$XMSTOP" = "" ] 
     815                                then 
     816                                        XMSTOP=$DEFMINSTOP 
     817                                fi 
     818                                if [ "$XMSTOP" = "t" -o "$XMSTOP" = "T" ] 
     819                                then 
     820                                        TestMinStop $FAN 
     821                                        XMSTOP=$fanval 
     822                                fi 
     823                        else 
     824                                XMSTOP=0 
    815825                        fi 
    816826                        if [ "$MINSTOP" = "" ] 
     
    820830                                MINSTOP="`echo $MINSTOP | sed -e "s/${pwmsed}[^ ]* *//g"` ${pwms}=${XMSTOP}" 
    821831                        fi 
    822                         echo 
    823                         echo "Enter the minimum PWM value ($XMSTOP-$MAX)" 
    824                         echo -n "at which the fan STARTS spinning (press t to test) ($DEFMINSTART): " 
    825                         read XMSTART 
    826                         if [ "$XMSTART" = "" ] 
    827                         then 
     832 
     833                        if [ $FAN_MIN -eq 0 ] 
     834                        then 
     835                                echo 
     836                                echo "Enter the minimum PWM value ($XMSTOP-$MAX)" 
     837                                echo -n "at which the fan STARTS spinning (press t to test) ($DEFMINSTART): " 
     838                                read XMSTART 
     839 
     840                                if [ "$XMSTART" = "" ] 
     841                                then 
     842                                        XMSTART=$DEFMINSTART 
     843                                fi 
     844                                if [ "$XMSTART" = "t" -o "$XMSTART" = "T" ] 
     845                                then 
     846                                        TestMinStart $XMSTOP 
     847                                        XMSTART=$fanval 
     848                                fi 
     849                        else 
    828850                                XMSTART=$DEFMINSTART 
    829                         fi 
    830                         if [ "$XMSTART" = "t" -o "$XMSTART" = "T" ] 
    831                         then 
    832                                 TestMinStart $XMSTOP 
    833                                 XMSTART=$fanval 
    834851                        fi 
    835852                        if [ "$MINSTART" = "" ] 
     
    839856                                MINSTART="`echo $MINSTART | sed -e "s/${pwmsed}[^ ]* *//g"` ${pwms}=${XMSTART}" 
    840857                        fi 
    841                         echo 
    842                         echo "Enter the PWM value (0-$XMSTOP) to use when the temperature" 
    843                         echo -n "is below the low temperature limit (0): " 
    844                         read XMINP 
     858 
     859                        if [ $XMSTOP -gt 0 ] 
     860                        then 
     861                                echo 
     862                                echo "Enter the PWM value (0-$XMSTOP) to use when the temperature" 
     863                                echo -n "is below the low temperature limit (0): " 
     864                                read XMINP 
     865                        else 
     866                                XMINP="" 
     867                        fi 
    845868                        if [ -n "$XMINP" ] 
    846869                        then