Skip to content

Commit

Permalink
Fix several drivers with zero tuning steps
Browse files Browse the repository at this point in the history
The valid_tuning_steps must be ... valid.
  • Loading branch information
kk7ds committed Sep 10, 2024
1 parent 7df43dc commit 569f012
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion chirp/drivers/ft1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ def get_features(self):
rf.valid_modes = list(MODES) + ['NFM', 'DN']
rf.valid_tmodes = list(TMODES)
rf.valid_duplexes = list(DUPLEX)
rf.valid_tuning_steps = list(STEPS)
rf.valid_tuning_steps = [x for x in STEPS if x]
rf.valid_bands = [(500000, 999900000)]
rf.valid_skips = SKIPS
rf.valid_power_levels = POWER_LEVELS
Expand Down
9 changes: 5 additions & 4 deletions chirp/drivers/ft4.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,8 @@ def get_memory_mappings(self, memory):
# these steps encode to 0-9 on all radios, but encoding #2 is disallowed
# on the US versions (FT-4XR)
STEP_CODE = [0, 5.0, 6.25, 10.0, 12.5, 15.0, 20.0, 25.0, 50.0, 100.0]
US_LEGAL_STEPS = list(STEP_CODE) # copy to pass to UI on US radios
VALID_STEPS = [x for x in STEP_CODE if x]
US_LEGAL_STEPS = list(VALID_STEPS) # copy to pass to UI on US radios
US_LEGAL_STEPS.remove(6.25) # euro radios just use STEP_CODE

# Map the radio image sql_type (0-6) to the CHIRP mem values.
Expand Down Expand Up @@ -1333,7 +1334,7 @@ class YaesuFT4XERadio(YaesuFT4GenericRadio):
id_str = b'IFT-35R\x00\x00V100\x00\x00'
valid_bands = VALID_BANDS_DUAL
DUPLEX_AUTO = DUPLEX_AUTO_EU
legal_steps = STEP_CODE
legal_steps = VALID_STEPS
BAND_ASSIGNMENTS = BAND_ASSIGNMENTS_DUALBAND


Expand Down Expand Up @@ -1373,7 +1374,7 @@ class YaesuFT65RRadio(YaesuFT65GenericRadio):
id_str = b'IH-420\x00\x00\x00V100\x00\x00'
valid_bands = VALID_BANDS_DUAL
DUPLEX_AUTO = DUPLEX_AUTO_US
legal_steps = STEP_CODE
legal_steps = VALID_STEPS
BAND_ASSIGNMENTS = BAND_ASSIGNMENTS_DUALBAND
DUPLEX_OFF_VIA_OFFSET = [ # matches the order of valid_bands
None, # Don't modify broadcast FM memories
Expand All @@ -1391,7 +1392,7 @@ class YaesuFT65ERadio(YaesuFT65GenericRadio):
id_str = b'IH-420\x00\x00\x00V100\x00\x00'
valid_bands = VALID_BANDS_DUAL
DUPLEX_AUTO = DUPLEX_AUTO_EU
legal_steps = STEP_CODE
legal_steps = VALID_STEPS
BAND_ASSIGNMENTS = BAND_ASSIGNMENTS_DUALBAND


Expand Down
2 changes: 1 addition & 1 deletion chirp/drivers/ft70.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ def get_features(self):
rf.valid_modes = list(MODES)
rf.valid_tmodes = list(TMODES)
rf.valid_duplexes = list(DUPLEX)
rf.valid_tuning_steps = list(STEPS)
rf.valid_tuning_steps = [x for x in STEPS if x]
rf.valid_bands = [(500000, 999900000)]
rf.valid_skips = SKIPS
rf.valid_power_levels = POWER_LEVELS
Expand Down
2 changes: 1 addition & 1 deletion chirp/drivers/ftm3200d.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def get_features(self):
rf.valid_tmodes = [x for x in TMODES if x is not None]
rf.valid_cross_modes = [x for x in CROSS_MODES if x is not None]
rf.valid_duplexes = list(ft1d.DUPLEX)
rf.valid_tuning_steps = list(STEPS)
rf.valid_tuning_steps = [x for x in STEPS if x]
rf.valid_bands = [(136000000, 174000000)]
# rf.valid_skips = SKIPS
rf.valid_power_levels = POWER_LEVELS
Expand Down
2 changes: 1 addition & 1 deletion chirp/drivers/ftm7250d.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def get_features(self):
rf.valid_tmodes = [x for x in TMODES if x is not None]
rf.valid_cross_modes = [x for x in CROSS_MODES if x is not None]
rf.valid_duplexes = list(ft1d.DUPLEX)
rf.valid_tuning_steps = list(STEPS)
rf.valid_tuning_steps = [x for x in STEPS if x]
rf.valid_bands = [(108000000, 580000000)]
# rf.valid_skips = SKIPS
rf.valid_power_levels = POWER_LEVELS
Expand Down
2 changes: 1 addition & 1 deletion chirp/drivers/icp7.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def get_features(self):
rf.valid_modes = MODES
rf.valid_bands = [(495000, 999990000)]
rf.valid_skips = ["", "S", "P"]
rf.valid_tuning_steps = TUNING_STEPS
rf.valid_tuning_steps = [x for x in TUNING_STEPS if x]
rf.valid_name_length = 6
rf.has_settings = True
rf.has_ctone = True
Expand Down
2 changes: 1 addition & 1 deletion chirp/drivers/id31.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def get_features(self):
rf.has_bank_index = True
rf.has_bank_names = True
rf.valid_tmodes = list(TMODES)
rf.valid_tuning_steps = sorted(list(TUNING_STEPS))
rf.valid_tuning_steps = sorted([x for x in TUNING_STEPS if x])
rf.valid_modes = list(self.MODES.values())
rf.valid_skips = ["", "S", "P"]
rf.valid_characters = chirp_common.CHARSET_ASCII
Expand Down

0 comments on commit 569f012

Please sign in to comment.