Update dtmf_aprs_cc.py skip every other command

beta-extra-3
Alan Johnston 1 year ago committed by GitHub
parent 082d396171
commit 665602b607
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -12,6 +12,7 @@ if __name__ == "__main__":
txLed = 27 txLed = 27
change_mode = False change_mode = False
debug_mode = False debug_mode = False
counter = 0
if (len(sys.argv)) > 1: if (len(sys.argv)) > 1:
# print("There are arguments!") # print("There are arguments!")
if ('d' == sys.argv[1]): if ('d' == sys.argv[1]):
@ -63,7 +64,8 @@ if __name__ == "__main__":
## system("echo 'Resuming rpitx'") ## system("echo 'Resuming rpitx'")
## system("sudo python3 -u /home/pi/CubeSatSim/rpitx.py s & > /dev/null 2>&1") ## system("sudo python3 -u /home/pi/CubeSatSim/rpitx.py s & > /dev/null 2>&1")
# change_mode = False # change_mode = False
if (debug_mode == False) and (change_mode == True): counter = (counter + 1) % 2
if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other command since Direwolf prints them twice
GPIO.setmode(GPIO.BCM) GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False) GPIO.setwarnings(False)
GPIO.setup(powerPin, GPIO.OUT) GPIO.setup(powerPin, GPIO.OUT)

Loading…
Cancel
Save

Powered by TurnKey Linux.