From e2b63f07a06067283e3e4611127c4a2e6a29cefd Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Thu, 5 Sep 2024 16:25:09 -0700 Subject: [PATCH 1/2] uvk5: Remove dummy valid_skips property This was done to avoid exposing anything in the skip column, but actually just confuses users about why they can't select skip. Fixes #11485 --- chirp/drivers/uvk5.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chirp/drivers/uvk5.py b/chirp/drivers/uvk5.py index d6a956ca..706fce67 100644 --- a/chirp/drivers/uvk5.py +++ b/chirp/drivers/uvk5.py @@ -684,6 +684,7 @@ def get_features(self): rf.valid_power_levels = UVK5_POWER_LEVELS rf.valid_special_chans = list(SPECIALS.keys()) rf.valid_duplexes = ["", "-", "+", "off"] + rf.valid_skips = [] # hack so we can input any frequency, # the 0.1 and 0.01 steps don't work unfortunately @@ -697,8 +698,6 @@ def get_features(self): rf.valid_modes = ["FM", "NFM", "AM", "NAM"] rf.valid_tmodes = ["", "Tone", "TSQL", "DTCS", "Cross"] - rf.valid_skips = [""] - # This radio supports memories 1-200, 201-214 are the VFO memories rf.memory_bounds = (1, 200) From e2dd6163ddbb68c80eb0ed73ae1ca59507a4134d Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Thu, 5 Sep 2024 16:25:58 -0700 Subject: [PATCH 2/2] Hide skip column when no valid skip values --- chirp/wxui/memedit.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/chirp/wxui/memedit.py b/chirp/wxui/memedit.py index 9744a073..fcebc0da 100644 --- a/chirp/wxui/memedit.py +++ b/chirp/wxui/memedit.py @@ -607,6 +607,12 @@ def hidden_for(self, memory): return memory.tmode != 'Cross' +class ChirpSkipColumn(ChirpChoiceColumn): + @property + def valid(self): + return self._features.valid_skips + + class ChirpCommentColumn(ChirpMemoryColumn): # This is just here so it is marked for translation __TITLE = _('Comment') @@ -1010,8 +1016,8 @@ def filter_unknowns(items): ChirpChoiceColumn('tuning_step', self._radio, valid_tuning_steps, label=_('Tuning Step')), - ChirpChoiceColumn('skip', self._radio, - valid_skips), + ChirpSkipColumn('skip', self._radio, + valid_skips), power_column, ChirpCommentColumn('comment', self._radio), ]