From 964d18045aac57d4d7a5b68a9469187f7467a410 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Jun 2026 11:33:45 -0400 Subject: [PATCH] Update command.sh check for mode --- groundstation/command.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/groundstation/command.sh b/groundstation/command.sh index fba837e6..4e99b0bd 100755 --- a/groundstation/command.sh +++ b/groundstation/command.sh @@ -2,6 +2,18 @@ # script to send APRS or DTMR commands to a CubeSatSim +value=`cat /home/pi/CubeSatSim/.mode` +echo "$value" > /dev/null +set -- $value + +if [ "$1" != "n" ]; then + + echo "Do you want to change to Transmit Commands mode?" + + exit + +fi + sudo killall -9 zenity &>/dev/null echo @@ -18,9 +30,12 @@ echo "No choice made." fi -if [ "mode" = "a" ]; then +if [ "$mode" = "a" ]; then - echo "CHange to APRS mode" + echo "Change to APRS mode" + + /home/pi/CubeSatSim/config -a fi +