From 21d10010414d28fc8501886ad521216b9d842b18 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 13 Aug 2023 09:50:23 -0400 Subject: [PATCH] add command count update for aprs mode --- rpitx.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rpitx.py b/rpitx.py index a13bc6af..cb657d0a 100644 --- a/rpitx.py +++ b/rpitx.py @@ -215,6 +215,17 @@ if __name__ == "__main__": print("carrier received!") command_tx = not command_tx print(command_tx) + + try: + command_count += 1 + filec = open("/home/pi/CubeSatSim/command_count.txt", "w") + string = filec.write(str(command_count_string)) + filec.close() + except: + if (debug_mode == 1): + print("Can't write command_count file!") + print("Command_count: ") + print(command_count) output(green, txLedOff) sleep(0.03)