From a3677fd5be42c0f3de0c75ae8844aa7b3ee9bf65 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 15 Jul 2024 11:15:51 -0400 Subject: [PATCH] Update config added -o to turn beacon on/off --- config | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/config b/config index 206f949b..f9947e8f 100755 --- a/config +++ b/config @@ -1094,6 +1094,41 @@ elif [ "$1" = "-F" ]; then ## sudo reboot now # sudo systemctl restart rpitx # fi + +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 + + if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then + echo "Turn beacon telemetry ON" + sudo rm /home/pi/CubeSatSim/beacon_off > /dev/null 2>&1 + 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 + restart=1 + fi + fi + elif [ "$1" = "-H" ]; then # echo @@ -1277,6 +1312,8 @@ elif [ "$1" = "-h" ]; then echo " -P Change the PL (Private Line) CTCSS/CDCSS codes for RX and TX" echo " -A Transmit APRS control packets to control another CubeSatSim" echo " -D Change Transmit command state APRS or DTMF" + echo " -o Change telemetry beacon transmit state" + echo exit