# HG changeset patch # User Kosta A. ve7kcy@gmail.com # Date 1597470720 0 # Sat Aug 15 05:52:00 2020 +0000 # Node ID 974d8d8bcabaf9c7d4283dbcffe51b9858536d1f # Parent 2c552ce0d1a8f59b1ace34da171d7a48450848ac [ic-v86] Adds reverse duplex memory setting for ICom IC-V86. Fixes #8179
diff --git a/chirp/drivers/icv86.py b/chirp/drivers/icv86.py --- a/chirp/drivers/icv86.py +++ b/chirp/drivers/icv86.py @@ -63,7 +63,7 @@ tuning_step:3; u8 reserved5:2, mode:1, - reserved6:1, + rev:1, duplex:2, reserved7:2; u8 reserved8:2, @@ -224,7 +224,7 @@ else: mem.extd_number = SPECIAL_REV[number] mem.immutable = ["name", "number", "extd_number", "skip"] - _usd = self._memobj.used[byte] if (number < 206) else None + _usd = self._memobj.used[byte] if (number <= 206) else None _skp = None
if _usd is not None and (_usd & bit): @@ -245,10 +245,15 @@ mem.tmode = TMODES[_mem.tmode] mem.power = POWER_LEVELS[_mem.power]
+ # Extras + mem.extra = RadioSettingGroup("extra", "Extra") + rev = RadioSetting("rev", "Reverse duplex", + RadioSettingValueBoolean(bool(_mem.rev))) + rev.set_doc("Reverse duplex") + mem.extra.append(rev) + if _skp is not None: mem.skip = (_skp & bit) and "S" or "" - else: - mem.skip = ""
return mem
@@ -271,7 +276,7 @@ byte = int(mem.number / 8)
_mem = self._memobj.memory[mem.number] - _usd = self._memobj.used[byte] if mem.number < 206 else None + _usd = self._memobj.used[byte] if mem.number <= 206 else None _skp = self._memobj.skips[byte] if mem.number < 200 else None
assert(_mem) @@ -311,6 +316,9 @@ _mem.tmode = TMODES.index(mem.tmode) _mem.power = POWER_LEVELS.index(mem.power)
+ for setting in mem.extra: + setattr(_mem, setting.get_name(), setting.value) + if _skp is not None: if mem.skip == "S": _skp |= bit