Update rpitx.py cycle through channels 0 - 6

beta-cc-hi
Alan Johnston 2 years ago committed by GitHub
parent f59813a975
commit 082d8d496f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -515,17 +515,20 @@ if __name__ == "__main__":
try: try:
f = open("/home/pi/CubeSatSim/cwready") f = open("/home/pi/CubeSatSim/cwready")
f.close() f.close()
system("gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw1.txt -r 48000 > /dev/null 2>&1")
system("sudo rm /home/pi/CubeSatSim/cwready") system("sudo rm /home/pi/CubeSatSim/cwready")
print("Sending cw1.txt") channel = 0
system("cat /home/pi/CubeSatSim/cw1.txt") while (channel < 7):
system("gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw" + channel + ".txt -r 48000 > /dev/null 2>&1")
channel += 1
# print("Sending cw1.txt")
# system("cat /home/pi/CubeSatSim/cw1.txt")
if (command_tx == True): if (command_tx == True):
output(txLed, txLedOn) output(txLed, txLedOn)
output (pd, 1) output (pd, 1)
sleep(0.1) sleep(0.1)
output (ptt, 0) output (ptt, 0)
# battery_saver_check() # battery_saver_check()
if (txc): if (txc):
system("aplay -D hw:CARD=Headphones,DEV=0 /home/pi/CubeSatSim/morse.wav") system("aplay -D hw:CARD=Headphones,DEV=0 /home/pi/CubeSatSim/morse.wav")
@ -539,6 +542,7 @@ if __name__ == "__main__":
output(txLed, txLedOff) output(txLed, txLedOff)
output (ptt, 1) output (ptt, 1)
command_control_check()
f.close() f.close()
# system("sudo rm /home/pi/CubeSatSim/cwready") # system("sudo rm /home/pi/CubeSatSim/cwready")
sleep(5) sleep(5)

Loading…
Cancel
Save

Powered by TurnKey Linux.