From 32f6b0b0f9ba98fcba3b907a42be259226566967 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 13 Jun 2024 05:49:32 -0400 Subject: [PATCH] Update rpitx.py force tx, don't use 12,13 --- rpitx.py | 59 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/rpitx.py b/rpitx.py index 90707180..d19a2d01 100644 --- a/rpitx.py +++ b/rpitx.py @@ -193,37 +193,42 @@ command_tx = True GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) -GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP) -GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_UP) -GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP) +#GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP) +#GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_UP) +#GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.setup(txc_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.setup(green, GPIO.OUT) -transmit = False -if GPIO.input(12) == False: - print("Version is v1 with UHF BPF") - transmit = True - txLed = 27 - txLedOn = 1 - txLedOff = 0 -elif GPIO.input(27) == False: - print("Version is TFB") - transmit = True - txLed = 22 - txLedOn = 0 - txLedOff = 1 -elif GPIO.input(13) == False: - print("Version is v1 with VHF BPF") - print("VHF transmit not implemented yet") +#transmit = False +transmit = True # force on for now +txLed = 27 +txLedOn = 1 +txLedOff = 0 +#if GPIO.input(12) == False: +# print("Version is v1 with UHF BPF") # transmit = True - txLed = 27 - txLedOn = 1 - txLedOff = 0 -else: - print("No BPF") - txLed = 27 - txLedOn = 1 - txLedOff = 0 +# txLed = 27 +# txLedOn = 1 +# txLedOff = 0 +#elif GPIO.input(27) == False: +# print("Version is TFB") +# transmit = True +# txLed = 22 +# txLedOn = 0 +# txLedOff = 1 +#elif GPIO.input(13) == False: +#if GPIO.input(13) == False: +# print("Version is v1 with VHF BPF") +# print("VHF transmit not implemented yet") +# transmit = True +# txLed = 27 +# txLedOn = 1 +# txLedOff = 0 +#else: +# print("No BPF") +# txLed = 27 +# txLedOn = 1 +# txLedOff = 0 # GPIO.setup(txLed, GPIO.OUT) # output(txLed, txLedOff)