From 2fd07ab57f53ed180644af8c35a83ec96f94611a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 13 Aug 2023 14:23:28 -0400 Subject: [PATCH] Update rpitx.py to create command_count.txt if not present --- rpitx.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rpitx.py b/rpitx.py index 94f1eeb8..aa7ed34a 100644 --- a/rpitx.py +++ b/rpitx.py @@ -127,6 +127,10 @@ if __name__ == "__main__": command_count = 0 if (debug_mode == 1): print("Can't open command_count file, setting to 0") + file = open("/home/pi/CubeSatSim/command_count.txt", "w") + count_string = str(command_count) + file.write(count_string) + file.close() print("Command_count: ") print(command_count)