[chirp_devel] [PATCH] [BF-888] Add "off" duplex support and compatibilty fix
# HG changeset patch # User Jim Unroe rock.unroe@gmail.com # Date 1476219857 14400 # Node ID 1fda674d2ff5ebc3a76b814ef4829edd6be05f21 # Parent 00852fbe5d162901f7108c4ef7c928e5bb98966e [BF-888] Add "off" duplex support and compatibilty fix
This patch...
- adds an "off" duplex (ie disable transmission) setting to the h777.py driver. - provides a fix that improves compatiblity with the OEM software.
Developed by Marcos Vives.
Related to #2291
diff -r 00852fbe5d16 -r 1fda674d2ff5 chirp/drivers/h777.py --- a/chirp/drivers/h777.py Mon Oct 10 17:25:49 2016 -0400 +++ b/chirp/drivers/h777.py Tue Oct 11 17:04:17 2016 -0400 @@ -259,6 +259,7 @@ rf.valid_modes = ["NFM", "FM"] # 12.5 KHz, 25 kHz. rf.valid_skips = ["", "S"] rf.valid_tmodes = ["", "Tone", "TSQL", "DTCS", "Cross"] + rf.valid_duplexes = ["", "-", "+", "split", "off"] rf.has_rx_dtcs = True rf.has_ctone = True rf.has_cross = True @@ -334,7 +335,10 @@ mem.empty = True return mem
- if int(_mem.rxfreq) == int(_mem.txfreq): + if _mem.txfreq.get_raw() == "\xFF\xFF\xFF\xFF": + mem.duplex = "off" + mem.offset = 0 + elif int(_mem.rxfreq) == int(_mem.txfreq): mem.duplex = "" mem.offset = 0 else: @@ -394,6 +398,13 @@ # NOTE: Only two settings right now, both are inverted setattr(_mem, setting.get_name(), not int(setting.value))
+ # When set to one, official programming software (BF-480) shows always + # "WFM", even if we choose "NFM". Therefore, for compatibility + # purposes, we will set these to zero. + _mem.unknown1 = 0; + _mem.unknown2 = 0; + _mem.unknown3 = 0; + def get_settings(self): _settings = self._memobj.settings basic = RadioSettingGroup("basic", "Basic Settings")
participants (1)
-
Jim Unroe