From 2783e455b4720da415b8a6250885982d89eecca9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 11 Nov 2023 11:48:59 -0500 Subject: [PATCH] Update rpitx.py added file.close --- rpitx.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rpitx.py b/rpitx.py index ca21fe4f..ee501fe0 100644 --- a/rpitx.py +++ b/rpitx.py @@ -20,6 +20,7 @@ def increment_mode(): # mode = "f" if (debug_mode == 1): print("Can't open .mode file") # , defaulting to FSK") + file.close() print("Mode is: ") print(mode) if (mode == 'a'): @@ -253,7 +254,8 @@ if __name__ == "__main__": except: callsign = "AMSAT" if (debug_mode == 1): - print("Can't read callsign from sim.cfg file, defaulting to AMSAT") + print("Can't read callsign from sim.cfg file, defaulting to AMSAT") + file.close() print(callsign) GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 GPIO.setup(txLed, GPIO.OUT)