[chirp_devel] [PATCH] [th9800] add tx inhibit feature per channel #2229
# HG changeset patch # User Jens Jensen af5mi@yahoo.com # Date 1421726365 21600 # Mon Jan 19 21:59:25 2015 -0600 # Node ID 56fed859d58a2139f6f13802d9df980561aee2cf # Parent 9ca5e99e7552a667b362e6f6dac67212fbbc6a34 [th9800] add tx inhibit feature per channel #2229
add tx inhibit feature by setting txfreq and offset to 0. Causes RX to be normal, but when duplex=off, no TX and ERROR displayed along with beep.
Note: Minor cosmetic side effect is that display indicates negative duplex offset, probably because 0 is always < rxfreq. This may be unavoidable unless we can find an actual channel flag which is designated for tx inhibit.
Also added channel field "reverse" to map.
diff -r 9ca5e99e7552 -r 56fed859d58a chirp/th9800.py --- a/chirp/th9800.py Sat Jan 17 10:10:54 2015 -0600 +++ b/chirp/th9800.py Mon Jan 19 21:59:25 2015 -0600 @@ -49,7 +49,7 @@ unknown1a:1, unknown1b:2; u8 rptmod:2, // off, -, + - unknown2a:1, + reverse:1, talkaround:1, step:4; u8 dtcs_pol:2, @@ -179,7 +179,7 @@ rf.has_bank = False rf.has_tuning_step = False rf.can_odd_split = True - rf.valid_duplexes = ["", "-", "+", "split"] + rf.valid_duplexes = ["", "-", "+", "split", "off"] rf.valid_tmodes = TMODES rf.valid_power_levels = POWER_LEVELS rf.valid_characters = chirp_common.CHARSET_UPPER_NUMERIC + "#*-+" @@ -251,6 +251,9 @@ txfreq = int(_mem.tx_freq) * 10 if txfreq == mem.freq: mem.duplex = "" + elif txfreq == 0: + mem.duplex = "off" + mem.offset = 0 elif abs(txfreq - mem.freq) > 70000000: mem.duplex = "split" mem.offset = txfreq @@ -340,6 +343,9 @@ _mem.tx_freq = (mem.freq - mem.offset) / 10 elif mem.duplex == "+": _mem.tx_freq = (mem.freq + mem.offset) / 10 + elif mem.duplex == "off": + _mem.tx_freq = 0 + _mem.offset = 0 else: _mem.tx_freq = mem.freq / 10
participants (1)
-
Jens Jensen