From 387d878b774dfc4f644f2b5f442ff7bf1ba6b8c0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 30 Jul 2024 17:43:01 -0400 Subject: [PATCH] Update dtmf_aprs_cc.py change -o to use config --- dtmf_aprs_cc.py | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index a77a65b0..063c26bd 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -47,20 +47,22 @@ if __name__ == "__main__": change_mode = True if ((line.find("MODE=o")) > 0) or ((line.find("DTMF>APDW15:t10#")) > 0): system("echo '\nBeacon Mode toggle!!\n'") - try: - fm = open("/home/pi/CubeSatSim/beacon_off") - fm.close() - system("echo 'Beacon is off, turning it ON'") - system("sudo rm /home/pi/CubeSatSim/beacon_off > /dev/null 2>&1") - except: - system("echo 'Beacon is on, turning it OFF'") - system("touch /home/pi/CubeSatSim/beacon_off") - - system("echo 'Restarting rpitx'") - system("sudo systemctl restart rpitx") -# system("echo 'Resuming rpitx'") -# system("sudo python3 -u /home/pi/CubeSatSim/rpitx.py s & > /dev/null 2>&1") - change_mode = False + mode = 'o' + change_mode = True +# try: +# fm = open("/home/pi/CubeSatSim/beacon_off") +# fm.close() +# system("echo 'Beacon is off, turning it ON'") +# system("sudo rm /home/pi/CubeSatSim/beacon_off > /dev/null 2>&1") +# except: +# system("echo 'Beacon is on, turning it OFF'") +# system("touch /home/pi/CubeSatSim/beacon_off") +# +# system("echo 'Restarting rpitx'") +# system("sudo systemctl restart rpitx") +## system("echo 'Resuming rpitx'") +## system("sudo python3 -u /home/pi/CubeSatSim/rpitx.py s & > /dev/null 2>&1") +# change_mode = False if (debug_mode == False) and (change_mode == True): GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False)