# HG changeset patch # User Marco Filippi iz3gme.marco@gmail.com # Date 1347359550 -7200 # Node ID dbd24655143fbc23be177f7f360a6c5c60bc0ac0 # Parent 7caa3ad6478679f88cc12d9d4a5da700d6b7e5bb [vx7] Fix setting power levels on 220MHz band to L2 introduced with r1668 fixing #214
diff --git a/chirp/vx7.py b/chirp/vx7.py --- a/chirp/vx7.py +++ b/chirp/vx7.py @@ -302,13 +302,12 @@ _mem.dcs = chirp_common.DTCS_CODES.index(mem.dtcs) _mem.tune_step = STEPS.index(mem.tuning_step)
- if _is220(mem.freq): - levels = POWER_LEVELS_220 - else: - levels = POWER_LEVELS - if mem.power: - _mem.power = levels.index(mem.power) + if _is220(mem.freq): + levels = [str(l) for l in POWER_LEVELS_220] + _mem.power = levels.index(str(mem.power)) + else: + _mem.power = POWER_LEVELS.index(mem.power) else: _mem.power = 0
@@ -322,7 +321,7 @@ msgs = yaesu_clone.YaesuCloneModeRadio.validate_memory(self, mem)
if _is220(mem.freq): - if str(mem.power) not in ["L1", "L2"]: + if str(mem.power) not in [str(l) for l in POWER_LEVELS_220]: msgs.append(chirp_common.ValidationError(\ "Power level %s not supported on 220MHz band" % \ mem.power))