diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 8d79ee47..c42d92d1 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -47,7 +47,6 @@ 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: f = open("/home/pi/CubeSatSim/beacon_off", "r") f.close() @@ -55,8 +54,9 @@ if __name__ == "__main__": system("touch /home/pi/CubeSatSim/beacon_off") except: print("Beacon is off, turning it ON") - system("sudo rm /home/pi/CubeSatSim/beacon_off") - + system("sudo rm /home/pi/CubeSatSim/beacon_off") + print("Restarting rpitx") + system("sudo systemctl restart rpitx") change_mode = False if (debug_mode == False) and (change_mode == True): GPIO.setmode(GPIO.BCM)