|
|
|
@ -18,13 +18,14 @@ if __name__ == "__main__":
|
|
|
|
if ('d' == sys.argv[1]):
|
|
|
|
if ('d' == sys.argv[1]):
|
|
|
|
debug_mode = True
|
|
|
|
debug_mode = True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
for line in sys.stdin:
|
|
|
|
for line in sys.stdin:
|
|
|
|
# if (debug_mode):
|
|
|
|
# if (debug_mode):
|
|
|
|
print(line, end =" ")
|
|
|
|
print(line, end =" ")
|
|
|
|
logging.warning(line)
|
|
|
|
logging.warning(line)
|
|
|
|
|
|
|
|
|
|
|
|
# if '^c' == line.rstrip():
|
|
|
|
# if '^c' == line.rstrip():
|
|
|
|
# break
|
|
|
|
# break
|
|
|
|
|
|
|
|
|
|
|
|
if ((line.find("MODE=a")) > 0):
|
|
|
|
if ((line.find("MODE=a")) > 0):
|
|
|
|
system("echo '\nAPRS Mode!!\n'")
|
|
|
|
system("echo '\nAPRS Mode!!\n'")
|
|
|
|
@ -80,7 +81,7 @@ if __name__ == "__main__":
|
|
|
|
system("echo '\nTransmit Commands Mode!!\n'")
|
|
|
|
system("echo '\nTransmit Commands Mode!!\n'")
|
|
|
|
mode = 'n'
|
|
|
|
mode = 'n'
|
|
|
|
change_mode = True
|
|
|
|
change_mode = True
|
|
|
|
# Currently, C2C does not support Repeater mode e
|
|
|
|
# Currently, C2C does not support Repeater mode e
|
|
|
|
if ((line.find("MODE=o")) > 0):
|
|
|
|
if ((line.find("MODE=o")) > 0):
|
|
|
|
system("echo '\nBeacon Mode toggle!!\n'")
|
|
|
|
system("echo '\nBeacon Mode toggle!!\n'")
|
|
|
|
mode = 'o'
|
|
|
|
mode = 'o'
|
|
|
|
@ -186,14 +187,15 @@ if __name__ == "__main__":
|
|
|
|
GPIO.output(txLed, 0)
|
|
|
|
GPIO.output(txLed, 0)
|
|
|
|
GPIO.output(powerPin, 0)
|
|
|
|
GPIO.output(powerPin, 0)
|
|
|
|
system("sudo systemctl stop rpitx")
|
|
|
|
system("sudo systemctl stop rpitx")
|
|
|
|
# system("sudo systemctl stop cubesatsim")
|
|
|
|
# system("sudo systemctl stop cubesatsim")
|
|
|
|
|
|
|
|
|
|
|
|
print("\n/home/pi/CubeSatSim/config -" + mode)
|
|
|
|
print("\n/home/pi/CubeSatSim/config -" + mode)
|
|
|
|
system("/home/pi/CubeSatSim/config -" + mode)
|
|
|
|
system("/home/pi/CubeSatSim/config -" + mode)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
change_mode = False
|
|
|
|
change_mode = False
|
|
|
|
|
|
|
|
except:
|
|
|
|
|
|
|
|
print("Error reading line (probably due to UTF-8 issue)")
|
|
|
|
print("Waiting 5 seconds to allow unplug and plug of soundcard")
|
|
|
|
print("Waiting 5 seconds to allow unplug and plug of soundcard")
|
|
|
|
sleep(5)
|
|
|
|
sleep(5)
|
|
|
|
print("Done")
|
|
|
|
print("Done")
|
|
|
|
|