Update transmit.py don't program FM on repeater mode, no cw if beacon off

fc-sub
Alan Johnston 7 months ago committed by GitHub
parent 45ac1b9aef
commit b6c8a9291d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -355,17 +355,18 @@ if __name__ == "__main__":
card = "Headphones" # default using pcm audio output of Pi Zero card = "Headphones" # default using pcm audio output of Pi Zero
# card = "Device" # using USB sound card for audio output # card = "Device" # using USB sound card for audio output
if (mode != 'e'):
print("Programming FM module!\n"); print("Programming FM module!\n");
output(pd, 1) output(pd, 1)
output (ptt, 1) output (ptt, 1)
try: try:
ser = serial.Serial("/dev/ttyAMA0", 9600) ser = serial.Serial("/dev/ttyAMA0", 9600)
print(ser.portstr) print(ser.portstr)
# uhf_string = "AT+DMOSETGROUP=0," + rx +"," + tx + ",0,3,0,0\r\n" # uhf_string = "AT+DMOSETGROUP=0," + rx +"," + tx + ",0,3,0,0\r\n"
uhf_string = "AT+DMOSETGROUP=0," + rx + "," + tx + "," + rxpl_value + "," + sq + "," + txpl_value + ",0\r\n" uhf_string = "AT+DMOSETGROUP=0," + rx + "," + tx + "," + rxpl_value + "," + sq + "," + txpl_value + ",0\r\n"
print(uhf_string) print(uhf_string)
for i in range(6): for i in range(6):
# ser.write(b"AT+DMOSETGROUP=0,435.0000,434.9000,0,3,0,0\r\n") # ser.write(b"AT+DMOSETGROUP=0,435.0000,434.9000,0,3,0,0\r\n")
ser.write(uhf_string.encode()) ser.write(uhf_string.encode())
sleep(0.1) sleep(0.1)
ser.close() ser.close()
@ -384,7 +385,7 @@ if __name__ == "__main__":
# if (mode != ) and (command_tx == True): # if (mode != ) and (command_tx == True):
# if (command_tx == True): # if (command_tx == True):
## if ((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'j')) and (command_tx == True) and (skip == False): ## if ((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'j')) and (command_tx == True) and (skip == False):
if (((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'j')) and (command_tx == True) and (skip == False)) or (mode == 'e'): if (((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'j')) and (command_tx == True) and (skip == False)) or ((mode == 'e') and (command_tx == True)):
# battery_saver_mode # battery_saver_mode
GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4
GPIO.setup(txLed, GPIO.OUT) GPIO.setup(txLed, GPIO.OUT)

Loading…
Cancel
Save

Powered by TurnKey Linux.