[chirp_devel] [PATCH] [UV-5R] Clean Up Code
Jim Unroe
Tue Jun 16 19:01:18 PDT 2015
# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1434505600 14400
# Node ID 1b9c9d87d0c32a67498829d2a06e2389fea049af
# Parent 317f6ec67709dc4a552dbfe09d1c2cd6e3fb916f
[UV-5R] Clean Up Code
This patch is to make recently added code more readable. There are no
changes in functionality.
Related to #2643
diff -r 317f6ec67709 -r 1b9c9d87d0c3 chirp/drivers/uv5r.py
--- a/chirp/drivers/uv5r.py Tue Jun 16 21:43:24 2015 -0400
+++ b/chirp/drivers/uv5r.py Tue Jun 16 21:46:40 2015 -0400
@@ -809,8 +809,7 @@
if not _mem.scan:
mem.skip = "S"
- if self.MODEL == "KT-980HP" or self.MODEL == "BF-F8HP" \
- or self.MODEL == "UV-82HP":
+ if self.MODEL in ("KT-980HP", "BF-F8HP", "UV-82HP"):
levels = UV5R_POWER_LEVELS3
else:
levels = UV5R_POWER_LEVELS
@@ -916,8 +915,7 @@
_mem.wide = mem.mode == "FM"
if mem.power:
- if self.MODEL == "KT-980HP" or self.MODEL == "BF-F8HP" \
- or self.MODEL == "UV-82HP":
+ if self.MODEL in ("KT-980HP", "BF-F8HP", "UV-82HP"):
levels = [str(l) for l in UV5R_POWER_LEVELS3]
_mem.lowpower = levels.index(str(mem.power))
else:
@@ -1349,8 +1347,7 @@
rs.set_apply_callback(apply_offset, _vfob)
workmode.append(rs)
- if self.MODEL == "KT-980HP" or self.MODEL == "BF-F8HP" \
- or self.MODEL == "UV-82HP":
+ if self.MODEL in ("KT-980HP", "BF-F8HP", "UV-82HP"):
rs = RadioSetting("vfoa.txpower3", "VFO A Power",
RadioSettingValueList(
TXPOWER3_LIST,
More information about the chirp_devel
mailing list