From e37594ebfd419321ff7e1b19af6b17d822c6f1ab Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 16 Jul 2024 08:11:24 -0400 Subject: [PATCH] Update config add transmit command beacon --- config | 66 +++++++++++++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/config b/config index 24109412..ccbfb306 100755 --- a/config +++ b/config @@ -1106,37 +1106,47 @@ elif [ "$1" = "-F" ]; then elif [ "$1" = "-o" ]; then - echo - echo "Change telemetry beacon transmit state" - echo - - FILE=/home/pi/CubeSatSim/beacon_off - if [ -f "$FILE" ]; then - echo "Transmit beacon telemetry is off" - echo - echo "Do you want to turn beacon telemetry ON (y/n) " - read reset - echo + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value - if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then - echo "Turn beacon telemetry ON" - sudo rm /home/pi/CubeSatSim/beacon_off > /dev/null 2>&1 - sudo systemctl restart rpitx -# restart=1 - fi + if [ "$1" == "n" ]; then - else - echo "Transmit beacon telemetry is on" - echo - echo "Do you want to turn beacon telemetry OFF (y/n) " - read reset - echo + transmit_command_beacon - if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then - echo "Turn beacon telemetry OFF" - touch /home/pi/CubeSatSim/beacon_off - sudo systemctl restart rpitx -# restart=1 + else + echo + echo "Change telemetry beacon transmit state" + echo + + FILE=/home/pi/CubeSatSim/beacon_off + if [ -f "$FILE" ]; then + echo "Transmit beacon telemetry is off" + echo + echo "Do you want to turn beacon telemetry ON (y/n) " + read reset + echo + + if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then + echo "Turn beacon telemetry ON" + sudo rm /home/pi/CubeSatSim/beacon_off > /dev/null 2>&1 + sudo systemctl restart rpitx + # restart=1 + fi + + else + echo "Transmit beacon telemetry is on" + echo + echo "Do you want to turn beacon telemetry OFF (y/n) " + read reset + echo + + if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then + echo "Turn beacon telemetry OFF" + touch /home/pi/CubeSatSim/beacon_off + sudo systemctl restart rpitx + # restart=1 + fi fi fi