Update squelch_cc.py change to config script

pull/323/head
Alan Johnston 1 year ago committed by GitHub
parent 46a4bf4c88
commit 3767408a56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -139,29 +139,32 @@ def increment_mode():
sleep(2.5) sleep(2.5)
try: try:
file = open("/home/pi/CubeSatSim/.mode", "w") print("/home/pi/CubeSatSim/config -" + mode)
count_string = str(command_count) system("/home/pi/CubeSatSim/config -" + mode)
file.write(mode)
file.close()
print(".mode file written")
GPIO.setwarnings(False) # file = open("/home/pi/CubeSatSim/.mode", "w")
GPIO.output(txLed, 0) # count_string = str(command_count)
GPIO.output(powerPin, 0) # file.write(mode)
print("sudo reboot -h now") # file.close()
GPIO.setwarnings(False) # print(".mode file written")
GPIO.setup(powerPin, GPIO.OUT)
GPIO.output(powerPin, 0); # GPIO.setwarnings(False)
# GPIO.output(txLed, 0)
# GPIO.output(powerPin, 0)
# print("sudo reboot -h now")
# GPIO.setwarnings(False)
# GPIO.setup(powerPin, GPIO.OUT)
# GPIO.output(powerPin, 0);
# system("reboot -h now") # system("reboot -h now")
# release = True; # release = True;
print("Changing mode now") print("Changing mode now")
# system("/home/pi/CubeSatSim/config -" + mode) # system("/home/pi/CubeSatSim/config -" + mode)
system("reboot -h now") # system("reboot -h now")
sleep(10); sleep(10);
except: except:
print("can't write to .mode file") print("can't change mode")
GPIO.setmode(GPIO.BCM) GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False) GPIO.setwarnings(False)

Loading…
Cancel
Save

Powered by TurnKey Linux.