Update config add -U to change random sim failure on off

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

@ -1745,6 +1745,55 @@ elif [ "$1" = "-N" ]; then
fi fi
elif [ "$1" = "-U" ]; then
echo
echo "Changing the Random Simulated Failure setting in"
echo "the configuration file for CubeSatSim"
echo
value=`cat /home/pi/CubeSatSim/sim.cfg`
echo "$value" > /dev/null
set -- $value
if [ "${12}" = "yes" ] || [ "${12}" = "y" ]; then
echo "Random Simulated Failure is ON"
else
echo "Random Simulated Failure is OFF"
fi
echo
# $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13}
echo "Do you want Random Simulated Failure ON (y/n) "
read sim
echo
if [ "$sim" = "y" ] || [ "$sim" = "yes" ] ; then
sim="yes"
echo "Random Simulated Failure is ON"
else
sim="no"
echo "Random Simulated Failure is OFF"
# echo "-1" > /home/pi/CubeSatSim/failure_mode.txt # make sure to turn off any simulated failures
fi
# echo
echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n"
# echo
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} $sim ${13}
echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} $sim ${13} > /home/pi/CubeSatSim/sim.cfg
echo
## echo "Rebooting CubeSatSim with new configuration file"
## echo
reboot=1
## sudo reboot now
# sudo restart cubesatsim
elif [ "$1" = "-h" ]; then elif [ "$1" = "-h" ]; then
echo "config OPTION" echo "config OPTION"
@ -1783,7 +1832,8 @@ elif [ "$1" = "-h" ]; then
echo " -L Change microphone level for command and control" echo " -L Change microphone level for command and control"
echo " -g Reset configuration back to default settings" echo " -g Reset configuration back to default settings"
echo " -M Set simulated failure mode" echo " -M Set simulated failure mode"
echo " -N Set next mode" echo " -U Change the random failure mode setting"
echo " -N Set next mode or failure"
echo echo
exit exit

Loading…
Cancel
Save

Powered by TurnKey Linux.