From d32debf636cd6e016d2613f2c2a1bdff769cca81 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 23 Jun 2021 23:08:47 -0400 Subject: [PATCH] if t.txt not there, create it --- rpitx.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rpitx.py b/rpitx.py index b4f2d94d..dc650a3d 100644 --- a/rpitx.py +++ b/rpitx.py @@ -98,6 +98,11 @@ if __name__ == "__main__": if (mode == 'a'): print("AFSK") # time.sleep(4) + try: + file = open("/home/pi/CubeSatSim/t.txt") + file.close() + except: + system("echo '" + callsign + ">APCSS:hi hi 100 199 199 199 298 299 299 278 380 350 300 300 439 400 400 400 500 500 500 500 600 600 600 650' > t.txt") for x in range(5): GPIO.output(txLed, txLedOn) if (debug_mode == 1):