[chirp_devel] [PATCH 1 of 2] For radios without tuning steps, test 10 KHz down from the edge. #4689
# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1490901242 25200 # Thu Mar 30 12:14:02 2017 -0700 # Node ID 38e99fa3fda076acd3c5989071aa048eb9d91a52 # Parent e2386f04138cf4d91b26d704c6dc58f80fe49ec3 For radios without tuning steps, test 10 KHz down from the edge. #4689
This should be compatible with virtually any radio.
diff -r e2386f04138c -r 38e99fa3fda0 tests/run_tests --- a/tests/run_tests Wed Mar 29 21:55:48 2017 -0700 +++ b/tests/run_tests Thu Mar 30 12:14:02 2017 -0700 @@ -535,7 +535,7 @@
def do_bandedges(self, rf): m = self._mem(rf) - min_step = min(rf.valid_tuning_steps or chirp_common.TUNING_STEPS) + min_step = min(rf.has_tuning_step and rf.valid_tuning_steps or [10])
for low, high in rf.valid_bands: for freq in (low, high - int(min_step * 1000)):
# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1490901245 25200 # Thu Mar 30 12:14:05 2017 -0700 # Node ID 99251f2b49ec2d21a73442768594f1fca3931e9a # Parent 38e99fa3fda076acd3c5989071aa048eb9d91a52 Fix radio drivers with invalid tuning step lists. #4689
New step list sources: IC-V82/U82: manual VX-5: radio menu VX-5: manual
diff -r 38e99fa3fda0 -r 99251f2b49ec chirp/drivers/icx8x.py --- a/chirp/drivers/icx8x.py Thu Mar 30 12:14:02 2017 -0700 +++ b/chirp/drivers/icx8x.py Thu Mar 30 12:14:05 2017 -0700 @@ -75,8 +75,7 @@ rf.valid_modes = ["FM", "NFM", "DV"] rf.valid_tmodes = ["", "Tone", "TSQL", "DTCS"] rf.valid_duplexes = ["", "-", "+"] - rf.valid_tuning_steps = [x for x in chirp_common.TUNING_STEPS - if x != 6.25] + rf.valid_tuning_steps = [5., 10., 12.5, 15., 20., 25., 30., 50.] if self._isuhf: rf.valid_bands = [(420000000, 470000000)] else: diff -r 38e99fa3fda0 -r 99251f2b49ec chirp/drivers/vx5.py --- a/chirp/drivers/vx5.py Thu Mar 30 12:14:02 2017 -0700 +++ b/chirp/drivers/vx5.py Thu Mar 30 12:14:05 2017 -0700 @@ -70,12 +70,7 @@ TMODES = ["", "Tone", "TSQL", "DTCS"] DUPLEX = ["", "-", "+", "split"] MODES = ["FM", "AM", "WFM"] -STEPS = list(chirp_common.TUNING_STEPS) -STEPS.remove(6.25) -STEPS.remove(30.0) -STEPS.append(100.0) -STEPS.append(9.0) - +STEPS = [5.0, 10.0, 12.5, 15.0, 20.0, 25.0, 50.0, 100.0] POWER_LEVELS = [chirp_common.PowerLevel("Hi", watts=5.00), chirp_common.PowerLevel("L3", watts=2.50), chirp_common.PowerLevel("L2", watts=1.00), @@ -177,6 +172,7 @@ rf.has_dtcs_polarity = False rf.valid_modes = MODES + ["NFM"] rf.valid_tmodes = TMODES + rf.valid_tuning_steps = STEPS rf.valid_duplexes = DUPLEX rf.memory_bounds = (1, 220) rf.valid_bands = [(500000, 16000000), diff -r 38e99fa3fda0 -r 99251f2b49ec chirp/drivers/vx7.py --- a/chirp/drivers/vx7.py Thu Mar 30 12:14:02 2017 -0700 +++ b/chirp/drivers/vx7.py Thu Mar 30 12:14:05 2017 -0700 @@ -81,11 +81,7 @@ MODES = ["FM", "AM", "WFM", "Auto"] TMODES = ["", "Tone", "TSQL", "DTCS", "Cross"] CROSS_MODES = ["DTCS->", "Tone->DTCS", "DTCS->Tone"] -STEPS = list(chirp_common.TUNING_STEPS) -STEPS.remove(6.25) -STEPS.remove(30.0) -STEPS.append(100.0) -STEPS.append(9.0) +STEPS = [5.0, 10.0, 12.5, 15.0, 20.0, 25.0, 50.0, 100.0, 9.0]
CHARSET = ["%i" % int(x) for x in range(0, 10)] + \ [" "] + \
participants (1)
-
Tom Hayward