add on/off to BPSK

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

@ -393,10 +393,25 @@ if __name__ == "__main__":
while 1: while 1:
output(txLed, txLedOff) output(txLed, txLedOff)
sleep(0.5) sleep(0.5)
if (command_tx == False):
output(txLed, txLedOn)
sleep(0.01)
output(txLed, txLedOff)
if GPIO.input(squelch) == False: if GPIO.input(squelch) == False:
print("carrier received!") print("carrier received!")
command_tx = not command_tx command_tx = not command_tx
print(command_tx) print(command_tx)
if (command_tx == True):
print("Turning on transmit")
system("echo > command_tx True")
system("sudo nc -l 8080 | csdr convert_i16_f | csdr fir_interpolate_cc 2 | csdr dsb_fc | csdr bandpass_fir_fft_cc 0.002 0.06 0.01 | csdr fastagc_ff | sudo /home/pi/rpitx/sendiq -i /dev/stdin -s 96000 -f 434.9e6 -t float &")
else:
print("Turning of transmit and rebooting")
system("echo > command_tx False")
system("sudo reboot now")
sleep(60)
if (command_tx == True):
output(txLed, txLedOn)
output(txLed, txLedOn) output(txLed, txLedOn)
sleep(4.0) sleep(4.0)
else: else:
@ -410,6 +425,10 @@ if __name__ == "__main__":
while 1: while 1:
output(txLed, txLedOff) output(txLed, txLedOff)
sleep(0.5) sleep(0.5)
if (command_tx == False):
output(txLed, txLedOn)
sleep(0.01)
output(txLed, txLedOff)
if GPIO.input(squelch) == False: if GPIO.input(squelch) == False:
print("carrier received!") print("carrier received!")
command_tx = not command_tx command_tx = not command_tx

Loading…
Cancel
Save

Powered by TurnKey Linux.