From 876c1ef0f27b6c137713cd573b81b5c13cb0344b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 10 Jul 2024 23:25:28 -0400 Subject: [PATCH] Update rpitx.py add force APRS with a --- rpitx.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/rpitx.py b/rpitx.py index b50d34e3..3db29cf9 100644 --- a/rpitx.py +++ b/rpitx.py @@ -263,20 +263,23 @@ debug_mode = 0 #no debugging rpitx if __name__ == "__main__": + mode = "x" if (len(sys.argv)) > 1: # print("There are arguments!") if (('d' == sys.argv[1]) or ('-d' in sys.argv[1])): debug_mode = 1 - + else if (('a' == sys.argv[1]) or ('-a' in sys.argv[1])): + mode = "a" + print("Forcing APRS mode") print(transmit) - - try: - file = open("/home/pi/CubeSatSim/.mode") - mode = file.read(1) - except: - mode = "f" - if (debug_mode == 1): - print("Can't open .mode file, defaulting to FSK") + if ( mode == "x"): + try: + file = open("/home/pi/CubeSatSim/.mode") + mode = file.read(1) + except: + mode = "f" + if (debug_mode == 1): + print("Can't open .mode file, defaulting to FSK") print("Mode is: ") print(mode)