[chirp_devel] [PATCH] [vx7] Fix power levels mix up during get/set_memory
Marco Filippi IZ3GME
Sun Sep 9 02:07:34 PDT 2012
# HG changeset patch
# User Marco Filippi <iz3gme.marco at gmail.com>
# Date 1347181492 -7200
# Node ID 7caa3ad6478679f88cc12d9d4a5da700d6b7e5bb
# Parent 75f19c73de256a40cd80a3b7ca164360a82032ae
[vx7] Fix power levels mix up during get/set_memory
fix bug #283
diff -r 75f19c73de25 -r 7caa3ad64786 chirp/vx7.py
--- a/chirp/vx7.py ven set 07 11:14:12 2012 -0600
+++ b/chirp/vx7.py dom set 09 11:04:52 2012 +0200
@@ -90,12 +90,13 @@
list(".,:;!\"#$%&'()*+-.=<>?@[?]^_\\{|}") + \
list("\x00" * 100)
-POWER_LEVELS = [chirp_common.PowerLevel("Hi", watts=5.00),
+POWER_LEVELS = [chirp_common.PowerLevel("L1", watts=0.05),
+ chirp_common.PowerLevel("L2", watts=1.00),
chirp_common.PowerLevel("L3", watts=2.50),
- chirp_common.PowerLevel("L2", watts=1.00),
- chirp_common.PowerLevel("L1", watts=0.05)]
-POWER_LEVELS_220 = [chirp_common.PowerLevel("L2", watts=0.30),
- chirp_common.PowerLevel("L1", watts=0.05)]
+ chirp_common.PowerLevel("Hi", watts=5.00)
+ ]
+POWER_LEVELS_220 = [chirp_common.PowerLevel("L1", watts=0.05),
+ chirp_common.PowerLevel("L2", watts=0.30)]
def _is220(freq):
return freq >= 222000000 and freq <= 225000000
@@ -250,10 +251,11 @@
mem.tuning_step = STEPS[_mem.tune_step]
mem.skip = pskip and "P" or skip and "S" or ""
- if mem.freq > 220000000 and mem.freq < 225000000:
- mem.power = POWER_LEVELS_220[1 - _mem.power]
+ if _is220(mem.freq):
+ levels = POWER_LEVELS_220
else:
- mem.power = POWER_LEVELS[3 - _mem.power]
+ levels = POWER_LEVELS
+ mem.power = levels[_mem.power]
for i in _mem.name:
if i == "\xFF":
More information about the chirp_devel
mailing list