# HG changeset patch # User Bernhard Hailer ham73tux@gmail.com # Date 1580884634 28800 # Tue Feb 04 22:37:14 2020 -0800 # Node ID 5bb4c48c5231a760c0bc62b01274901fb0804333 # Parent 427edcaeed8ddbffc1fa17fe1c8af32c4f277899 [ft4] After CSV import, channels were always low power. Fixes #7603 After a CSV file was imported, all imported channels were displayed and uploaded with low power. This patch ensures the recommended high power setting will now be used.
diff --git a/chirp/drivers/ft4.py b/chirp/drivers/ft4.py --- a/chirp/drivers/ft4.py +++ b/chirp/drivers/ft4.py @@ -476,9 +476,10 @@
SKIPS = ["", "S"]
-POWER_LEVELS = [chirp_common.PowerLevel("Low", watts=0.5), - chirp_common.PowerLevel("Mid", watts=2.5), - chirp_common.PowerLevel("High", watts=5.0)] +POWER_LEVELS = [ + chirp_common.PowerLevel("High", watts=5.0), # high must be first (0) + chirp_common.PowerLevel("Mid", watts=2.5), + chirp_common.PowerLevel("Low", watts=0.5)]
# these steps encode to 0-9 on all radios, but encoding #2 is disallowed # on the US versions (FT-4XR) @@ -1142,7 +1143,9 @@ _mem.freq = txfreq self.encode_sql(mem, _mem) if mem.power: - _mem.tx_pwr = POWER_LEVELS.index(mem.power) + _mem.tx_pwr = 2 - POWER_LEVELS.index(mem.power) + else: + _mem.tx_pwr = 0 # set to "High" if CHIRP canonical value is None _mem.tx_width = mem.mode == "NFM" _mem.step = STEP_CODE.index(mem.tuning_step)