From a73d7721dc7293f9b44f5d8efbdb69f5634b458d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 30 Jun 2024 12:37:48 -0400 Subject: [PATCH] Update squelch_cc.py fixed indents --- squelch_cc.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/squelch_cc.py b/squelch_cc.py index 4a28f8c8..8b474790 100644 --- a/squelch_cc.py +++ b/squelch_cc.py @@ -5,8 +5,8 @@ def command_control_check(): # global command_control # global no_command -# global debug_mode - command_count = 0 +# global debug_mode + command_count = 0 # output(pd, 1) # output(ptt, 1) @@ -17,21 +17,21 @@ def command_control_check(): # command_tx = not command_tx # print(command_tx) - try: - file = open("/home/pi/CubeSatSim/command_count.txt", "r") - string = file.read() - file.close() - command_count = int(string) - command_count += 1 - filec = open("/home/pi/CubeSatSim/command_count.txt", "w") - command_count_string = str(command_count) - print(command_count_string) - string = filec.write(command_count_string) - filec.close() - except: - print("Can't write command_count file!") - print("Command_count: ") - print(command_count) + try: + file = open("/home/pi/CubeSatSim/command_count.txt", "r") + string = file.read() + file.close() + command_count = int(string) + command_count += 1 + filec = open("/home/pi/CubeSatSim/command_count.txt", "w") + command_count_string = str(command_count) + print(command_count_string) + string = filec.write(command_count_string) + filec.close() + except: + print("Can't write command_count file!") + print("Command_count: ") + print(command_count) increment_mode() @@ -162,4 +162,4 @@ def increment_mode(): print("can't write to .mode file") while True: - command_control_check() + command_control_check()