Update config add failure mode number

sim-fail-4
Alan Johnston 4 months ago committed by GitHub
parent 274586971a
commit 3905502696
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1506,44 +1506,44 @@ elif [ "$1" = "-M" ]; then
FILE=/home/pi/CubeSatSim/failure_mode.txt FILE=/home/pi/CubeSatSim/failure_mode.txt
if [ -f "$FILE" ]; then if [ -f "$FILE" ]; then
if [[ $(grep "\-1" $FILE) ]]; then if [[ $(grep "\-1" $FILE) ]]; then
echo "Currently, no simulated failure" echo "Currently, no simulated failure (0)"
else else
fail=$(<$FILE) fail=$(<$FILE)
echo -n "Currently, simulated " echo -n "Currently, simulated "
case $fail in case $fail in
1) 1)
echo "+Y Solar Panel Unplugged" echo "+Y Solar Panel Unplugged (1)"
;; ;;
2) 2)
echo "+X Solar Panel Failure" echo "+X Solar Panel Failure (2)"
;; ;;
3) 3)
echo "-X Solar Panel Degredation" echo "-X Solar Panel Degredation (3)"
;; ;;
4) 4)
echo "-Y Solar Panel Short Circuit" echo "-Y Solar Panel Short Circuit (4)"
;; ;;
5) 5)
echo "Failed I2C Bus 1" echo "Failed I2C Bus 1 (5)"
;; ;;
6) 6)
echo "Failed I2C Bus 3" echo "Failed I2C Bus 3 (6)"
;; ;;
7) 7)
echo "Failed Camera" echo "Failed Camera (7)"
;; ;;
8) 8)
echo "Failed Payload" echo "Failed Payload (8)"
;; ;;
9) 9)
echo "Failed BME Sensor" echo "Failed BME Sensor (9)"
;; ;;
"10") "10")
echo "Failed MPU Sensor" echo "Failed MPU Sensor (10)"
;; ;;
"11") "11")
echo "Failed FM Audio" echo "Failed FM Audio (11)"
;; ;;
*) *)
echo "Unknown Failure" echo "Unknown Failure"
@ -1570,11 +1570,9 @@ elif [ "$1" = "-M" ]; then
echo " 9 Failed BME Sensor" echo " 9 Failed BME Sensor"
echo "10 Failed MPU Sensor" echo "10 Failed MPU Sensor"
echo "11 Failed FM Audio" echo "11 Failed FM Audio"
# echo "12 Random Failure"
echo echo
echo "Enter the failure number to set: 0 - 11" echo "Enter the failure number to set: 0 - 11"
# echo "Enter the failure number to set: 0 - 9"
read MODE read MODE
echo echo
fi fi

Loading…
Cancel
Save

Powered by TurnKey Linux.