Commit 0a376436 authored by Benoit Rat's avatar Benoit Rat

sw: add FAN checking

parent ac39fabf
......@@ -21,26 +21,27 @@ printf "======: $0\n"
pwm_module=/wr/lib/modules/at91_softpwm.ko
if [[ -f $pwm_module ]]; fi
insmod &> /dev/null
if [[ -f $pwm_module ]]; then
insmod $pwm_module &> /dev/null
else
echo "$pwm_module not found"
fi
speed=10
while [ speed -lt 80 ]; do
speed=100
while [ ${speed} -gt 30 ]; do
echo "$speed"
${APTS_SWITCH_DIR}/bin/shw_tool --fan ${speed}
speed=$(expr $speed + 10)
sleep 1
speed=$(expr $speed - 10)
done
user_echoasking "y/n" "Did you hear the speed of FAN increase"
ret0=$ret
if [ $ret == "n" ]; then
user_echoasking "y/n" "Does the FAN is working?"
ret1=$ret
if [ $ret == "n" ]; then
ans=""
user_echoasking "y/n" "Did you hear the speed of FAN decrease" "fan_speed_up"
ret0=-$?
if [ $ans == "n" ]; then
user_echoasking "y/n" "Does the FAN is working?" "fan_enable"
ret1=-$?
if [ $ans == "n" ]; then
echo "WARNING: NO FAN DETECTED! YOU SHOULD STOP THIS TEST BEFORE OVERHEATING YOUR FPGA"
fi
fi
......
......@@ -22,7 +22,7 @@ run()
if [ x"$1" != x ]; then
numseq="$1"
else
numseq="01 02 05 06 07 08 09 10"
numseq="01 02 03 05 06 07 08 09 10"
fi
for itest in $numseq; do
load_ask2run $(ls *${itest}-*.sh) $ask $update $inlog
......@@ -77,9 +77,8 @@ done
# Obtain mac address
#MAC=$(ifconfig | grep 'eth0' | tr -s ' ' | cut -d ' ' -f5 | sed s/://g)
if [ ${SN} -eq "0" ]; then
ret=""
user_echoasking "num" "Type the serial number" "S/N"
SN=$ret;
SN=$ans;
fi
export logfname="${APTS_SWITCH_DIR}/logs/output-${SN}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment