[chirp_devel] [PATCH 2 of 2] drivers/ft60: add support for "off" duplex mode (#2891)
Cody P Schafer
Fri Oct 2 17:46:24 PDT 2015
# HG changeset patch
# User Cody P Schafer <dev at codyps.com>
# Date 1443833114 14400
# Fri Oct 02 20:45:14 2015 -0400
# Node ID 2628a7decd6363fc5875c4ad5e84fc0323737c32
# Parent f599c685d5cc42229028905e63f606358e05462b
drivers/ft60: add support for "off" duplex mode (#2891)
By using a tx frequency of '0', the radio (or at least my ft60) refuses to
transmit (gives "ERROR" on the screen) when the PTT key is pressed.
diff --git a/chirp/drivers/ft60.py b/chirp/drivers/ft60.py
--- a/chirp/drivers/ft60.py
+++ b/chirp/drivers/ft60.py
@@ -272,7 +272,7 @@
u8 checksum;
"""
-DUPLEX = ["", "", "-", "+", "split"]
+DUPLEX = ["", "", "-", "+", "split", "off"]
TMODES = ["", "Tone", "TSQL", "TSQL-R", "DTCS"]
POWER_LEVELS = [chirp_common.PowerLevel("High", watts=5.0),
chirp_common.PowerLevel("Mid", watts=2.0),
@@ -703,7 +703,10 @@
mem.offset = int(_mem.offset) * 50000
mem.duplex = DUPLEX[_mem.duplex]
if mem.duplex == "split":
- mem.offset = _decode_freq(_mem.tx_freq)
+ if int(_mem.tx_freq) == 0:
+ mem.duplex = "off"
+ else:
+ mem.offset = _decode_freq(_mem.tx_freq)
mem.tmode = TMODES[_mem.tmode]
mem.rtone = chirp_common.TONES[_mem.tone]
mem.dtcs = chirp_common.DTCS_CODES[_mem.dtcs]
@@ -747,6 +750,9 @@
_mem.tx_freq, flags = _encode_freq(mem.offset)
_mem.tx_freq[0].set_bits(flags)
_mem.offset = 0
+ elif mem.duplex == "off":
+ _mem.tx_freq = 0
+ _mem.offset = 0
else:
_mem.tx_freq = 0
_mem.offset = mem.offset / 50000
More information about the chirp_devel
mailing list