From 0c9286a6cfd9de7e66dbc4fbbe76f4f796797905 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 10:33:31 -0400 Subject: [PATCH] Update config -t with param --- config | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/config b/config index 41a91dda..42bb9f89 100755 --- a/config +++ b/config @@ -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