add command test for CW mode

fm-rx
Alan Johnston 2 years ago committed by GitHub
parent 341cea0d96
commit 4cca6a4e89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -235,8 +235,10 @@ if __name__ == "__main__":
file.close()
except:
system("echo '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' > /home/pi/CubeSatSim/cw.txt")
output(txLed, txLedOn)
output(pd, 1)
if (command_tx == True):
output(txLed, txLedOn)
output (ptt, 0)
sleep(0.1)
@ -250,7 +252,6 @@ if __name__ == "__main__":
output(txLed, txLedOff)
output (ptt, 1)
output(pd, 1)
while True:
if GPIO.input(squelch) == False:
@ -274,6 +275,8 @@ if __name__ == "__main__":
try:
f = open("/home/pi/CubeSatSim/cwready")
system("gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw.txt -r 48000 > /dev/null 2>&1")
if (command_tx == True):
output(txLed, txLedOn)
output (ptt, 0)
sleep(0.1)
@ -289,9 +292,10 @@ if __name__ == "__main__":
sleep(0.1)
output(txLed, txLedOff)
output (ptt, 1)
f.close()
system("sudo rm /home/pi/CubeSatSim/cwready")
sleep(5)
sleep(1)
except:
sleep(1)
elif (mode == 's'):

Loading…
Cancel
Save

Powered by TurnKey Linux.