Update squelch_cc.py add debug mode with d

pull/323/head
Alan Johnston 1 year ago committed by GitHub
parent 40c65cd5fc
commit 1f3cd708b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -7,7 +7,7 @@ def command_control_check():
# global command_control
# global no_command
# global debug_mode
global debug_mode
command_count = 0
squelch = 6
@ -47,12 +47,14 @@ def command_control_check():
# else:
# print("Turning off transmit")
# system("echo > command_tx False")
else:
print("No carrier received!")
## else:
## print("No carrier received!")
# output(pd, 0)
# sleep(1)
def increment_mode():
global debug_mode
print("increment mode")
powerPin = 16
try:
@ -141,6 +143,7 @@ def increment_mode():
try:
print("/home/pi/CubeSatSim/config -" + mode)
if (debug_mode == False):
system("/home/pi/CubeSatSim/config -" + mode)
# file = open("/home/pi/CubeSatSim/.mode", "w")
@ -167,6 +170,12 @@ def increment_mode():
except:
print("can't change mode")
debug_mode = False
if (len(sys.argv)) > 1:
# print("There are arguments!")
if ('d' == sys.argv[1]):
debug_mode = True
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
squelch = 6

Loading…
Cancel
Save

Powered by TurnKey Linux.