[chirp_devel] [PATCH] [tg-uv2+] Channel numbering alignment to radio (i.e. 0-199)
# HG changeset patch # User Ran Katz rankatz@gmail.com # Date 1647898879 -7200 # Mon Mar 21 23:41:19 2022 +0200 # Node ID ec5904a32eed30ad4d994d39771b21d9b9d22e50 # Parent 161021504f56c8cb88224922f3cde66c62676419 [tg-uv2+] Channel numbering alignment to radio (i.e. 0-199)
(Was 1-200)
diff --git a/chirp/drivers/tg_uv2p.py b/chirp/drivers/tg_uv2p.py --- a/chirp/drivers/tg_uv2p.py +++ b/chirp/drivers/tg_uv2p.py @@ -256,7 +256,7 @@ rf.has_ctone = True rf.has_bank = False rf.has_tuning_step = True - rf.memory_bounds = (1, 200) + rf.memory_bounds = (0, 199) return rf
def sync_in(self): @@ -280,7 +280,7 @@ self._memobj = bitwise.parse(mem_format, self._mmap)
def get_raw_memory(self, number): - return repr(self._memobj.channels[number - 1]) + return repr(self._memobj.channels[number])
def _decode_tone(self, _mem, which): def _get(field): @@ -327,9 +327,9 @@ return (getattr(self._memobj, number.lower()), None)
else: - return (self._memobj.channels[number - 1], - self._memobj.bandflags[number - 1], - self._memobj.names[number - 1].name) + return (self._memobj.channels[number], + self._memobj.bandflags[number], + self._memobj.names[number].name)
def get_memory(self, number): _mem, _bf, _nam = self._get_memobjs(number)
participants (1)
-
Ran Katz