|
|
|
|
@ -553,28 +553,32 @@ elif [ "$1" = "-s" ]; then
|
|
|
|
|
elif [ "$1" = "-t" ]; then
|
|
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
echo "Editing the Simulated Telemetry setting in"
|
|
|
|
|
echo "the configuration file for CubeSatSim"
|
|
|
|
|
echo "Setting the Simulated Telemetry setting"
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
value=`cat /home/pi/CubeSatSim/sim.cfg`
|
|
|
|
|
echo "$value" > /dev/null
|
|
|
|
|
set -- $value
|
|
|
|
|
|
|
|
|
|
if [ "$5" = "yes" ] || [ "$5" = "y" ]; then
|
|
|
|
|
echo "Simulated Telemetry is ON"
|
|
|
|
|
if [ -z "$param2" ] ; then
|
|
|
|
|
|
|
|
|
|
if [ "$5" = "yes" ] || [ "$5" = "y" ]; then
|
|
|
|
|
echo "Simulated Telemetry is ON"
|
|
|
|
|
else
|
|
|
|
|
echo "Simulated Telemetry is OFF"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
# $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} ${14}
|
|
|
|
|
|
|
|
|
|
echo "Do you want Simulated Telemetry ON (y/n) "
|
|
|
|
|
read sim
|
|
|
|
|
echo
|
|
|
|
|
else
|
|
|
|
|
echo "Simulated Telemetry is OFF"
|
|
|
|
|
sim="$param2"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
# $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} ${14}
|
|
|
|
|
|
|
|
|
|
echo "Do you want Simulated Telemetry ON (y/n) "
|
|
|
|
|
read sim
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$sim" = "y" ] || [ "$sim" = "yes" ] ; then
|
|
|
|
|
sim="yes"
|
|
|
|
|
echo "Simulated Telemetry is ON"
|
|
|
|
|
@ -583,19 +587,15 @@ elif [ "$1" = "-t" ]; then
|
|
|
|
|
echo "Simulated Telemetry 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 $sim $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14}
|
|
|
|
|
echo $1 $2 $3 $4 $sim $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} > /home/pi/CubeSatSim/sim.cfg
|
|
|
|
|
echo
|
|
|
|
|
## echo "Rebooting CubeSatSim with new configuration file"
|
|
|
|
|
## echo
|
|
|
|
|
|
|
|
|
|
reboot=1
|
|
|
|
|
## sudo reboot now
|
|
|
|
|
# sudo restart cubesatsim
|
|
|
|
|
|
|
|
|
|
elif [ "$1" = "-c" ]; then
|
|
|
|
|
|
|
|
|
|
|