Skip to content

Commit

Permalink
kenwood_live: Refresh memory after setting
Browse files Browse the repository at this point in the history
Found while testing something on a D74, our set-memory cache logic
is complicated by the radios that don't support alpha tags. Instead
of assuming success with both memory and name is the case where we
should cache the outgoing memory, invalidate the cache so we will
re-fetch the memory from the radio to confirm it is correct. This is
what we already do with erase_memory()
  • Loading branch information
kk7ds committed Jan 2, 2025
1 parent 927ba36 commit 3e66222
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chirp/drivers/kenwood_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ def set_memory(self, memory):

spec = self._make_mem_spec(memory)
spec = ",".join(spec)
del self._memcache[memory.number]
r1 = self.command(self.pipe,
*self._cmd_set_memory(memory.number, spec))
if not iserr(r1) and self._has_name:
Expand All @@ -281,7 +282,6 @@ def set_memory(self, memory):
*self._cmd_set_memory_name(memory.number, memory.name))
if not iserr(r2):
memory.name = memory.name.rstrip()
self._memcache[memory.number] = memory.dupe()
else:
raise errors.InvalidDataError("Radio refused name %i: %s" %
(memory.number,
Expand Down

0 comments on commit 3e66222

Please sign in to comment.