|
|
|
|
@ -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")
|
|
|
|
|
|