Update transmit.py don't stop and start rpitx

master-b-p-s
Alan Johnston 2 weeks ago committed by GitHub
parent 657e82899d
commit 4a9811ec94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -557,6 +557,7 @@ if __name__ == "__main__":
rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &" rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &"
stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1"
system(stop_rpitx) system(stop_rpitx)
system(rpitx)
while (True): while (True):
if (txc): if (txc):
sleep(0.1) sleep(0.1)
@ -572,11 +573,11 @@ if __name__ == "__main__":
# sleep(0.1) # sleep(0.1)
while (input(17) == 0): while (input(17) == 0):
sleep(0.05) sleep(0.05)
system(rpitx) ## system(rpitx)
# print("1") # print("1")
while (input(17) == 1): while (input(17) == 1):
sleep(0.05) sleep(0.05)
system(stop_rpitx) ## system(stop_rpitx)
# print("0") # print("0")
# sleep(10) # sleep(10)

Loading…
Cancel
Save

Powered by TurnKey Linux.