Update config changed fail sim off to -1

sim-fail-2
Alan Johnston 4 months ago committed by GitHub
parent 1edc141f7c
commit bfa666b1e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -278,7 +278,7 @@ if [ "$1" = "" ]; 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 '0' $FILE) ]]; then if [[ $(grep '-1' $FILE) ]]; then
echo "No simulated failure" echo "No simulated failure"
else else
fail=$(<$FILE) fail=$(<$FILE)
@ -1486,7 +1486,7 @@ 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 '0' $FILE) ]]; then if [[ $(grep '-1' $FILE) ]]; then
echo "Currently, no simulated failure" echo "Currently, no simulated failure"
else else
fail=$(<$FILE) fail=$(<$FILE)
@ -1533,7 +1533,7 @@ elif [ "$1" = "-M" ]; then
fi fi
echo echo
echo "Set simulated failure mode" echo "Set simulated failure mode (or Return to turn OFF)"
echo echo
echo " 0 No Failure (turn OFF)" echo " 0 No Failure (turn OFF)"
@ -1555,6 +1555,7 @@ elif [ "$1" = "-M" ]; then
echo echo
if [ "$MODE" = "0" ]; then if [ "$MODE" = "0" ]; then
echo "Setting No Simulated Failure" echo "Setting No Simulated Failure"
MODE="-1"
else else
case $MODE in case $MODE in

Loading…
Cancel
Save

Powered by TurnKey Linux.