From 145b5b363b93395f6e628ae684c31b1a123d33fc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 30 Jun 2024 15:20:22 -0400 Subject: [PATCH] Update squelch_cc.py turn off LEDs sooner --- squelch_cc.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/squelch_cc.py b/squelch_cc.py index 3461d2ae..b6973e94 100644 --- a/squelch_cc.py +++ b/squelch_cc.py @@ -145,30 +145,27 @@ def increment_mode(): try: print("/home/pi/CubeSatSim/config -" + mode) - if (debug_mode == False): + if (debug_mode == False): + GPIO.setwarnings(False) + GPIO.output(txLed, 0) + GPIO.output(powerPin, 0) + system("sudo systemctl stop rpitx") system("/home/pi/CubeSatSim/config -" + mode) - + print("Changing mode now") # file = open("/home/pi/CubeSatSim/.mode", "w") # count_string = str(command_count) # file.write(mode) # file.close() # print(".mode file written") - - GPIO.setwarnings(False) - GPIO.output(txLed, 0) - GPIO.output(powerPin, 0) - system("sudo systemctl stop rpitx") # print("sudo reboot -h now") # GPIO.setwarnings(False) # GPIO.setup(powerPin, GPIO.OUT) # GPIO.output(powerPin, 0); # system("reboot -h now") # release = True; - - print("Changing mode now") # system("/home/pi/CubeSatSim/config -" + mode) # system("reboot -h now") - print + print(" ") # sleep(10); except: print("can't change mode")