Update rpitx.py added mode_increment() function

sr-frs-rx-mode
Alan Johnston 2 years ago committed by GitHub
parent bb92686032
commit 863f50f802
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,8 @@
#!/usr/bin/env python #!/usr/bin/env python
def increment_mode():
print("increment mode")
import RPi.GPIO as GPIO import RPi.GPIO as GPIO
from RPi.GPIO import output from RPi.GPIO import output
#import subprocess #import subprocess
@ -237,6 +240,8 @@ if __name__ == "__main__":
sleep(0.03) sleep(0.03)
output(green, txLedOn) output(green, txLedOn)
increment_mode()
if (command_tx == True): if (command_tx == True):
print("Turning on transmit") print("Turning on transmit")
system("echo > command_tx True") system("echo > command_tx True")
@ -305,6 +310,8 @@ if __name__ == "__main__":
sleep(0.03) sleep(0.03)
output(green, txLedOn) output(green, txLedOn)
increment_mode()
if (command_tx == True): if (command_tx == True):
print("Turning on transmit") print("Turning on transmit")
system("echo > command_tx True") system("echo > command_tx True")
@ -440,6 +447,8 @@ if __name__ == "__main__":
sleep(0.03) sleep(0.03)
output(green, txLedOn) output(green, txLedOn)
increment_mode()
if (command_tx == True): if (command_tx == True):
print("Turning on transmit") print("Turning on transmit")
system("echo > command_tx True") system("echo > command_tx True")
@ -526,6 +535,8 @@ if __name__ == "__main__":
sleep(0.03) sleep(0.03)
output(green, txLedOn) output(green, txLedOn)
increment_mode()
if (command_tx == True): if (command_tx == True):
print("Turning on transmit") print("Turning on transmit")
system("echo > command_tx True") system("echo > command_tx True")
@ -613,6 +624,8 @@ if __name__ == "__main__":
sleep(0.03) sleep(0.03)
output(green, txLedOn) output(green, txLedOn)
increment_mode()
if (command_tx == True): if (command_tx == True):
print("Turning on transmit") print("Turning on transmit")
system("echo > command_tx True") system("echo > command_tx True")
@ -663,6 +676,8 @@ if __name__ == "__main__":
sleep(0.03) sleep(0.03)
output(green, txLedOn) output(green, txLedOn)
increment_mode()
if (command_tx == True): if (command_tx == True):
print("Turning on transmit") print("Turning on transmit")
system("echo > command_tx True") system("echo > command_tx True")

Loading…
Cancel
Save

Powered by TurnKey Linux.