[chirp_devel] [PATCH 23/24] Fix style issues in thuv1f.py (#2355)
Zach Welch
Tue Mar 3 00:38:18 PST 2015
# HG changeset patch
# User Zach Welch <zach at mandolincreekfarm.com>
# Fake Node ID f3550aa0750a46d1deb15f3a58d6c540d391318d
Fix style issues in thuv1f.py (#2355)
diff --git a/chirp/drivers/thuv1f.py b/chirp/drivers/thuv1f.py
index c5ac91f..73ec10c 100644
--- a/chirp/drivers/thuv1f.py
+++ b/chirp/drivers/thuv1f.py
@@ -22,6 +22,7 @@ from chirp.settings import RadioSetting, RadioSettingGroup, \
RadioSettingValueBoolean, RadioSettingValueString, \
RadioSettings
+
def uvf1_identify(radio):
"""Do identify handshake with TYT TH-UVF1"""
radio.pipe.write("PROG333")
@@ -37,6 +38,7 @@ def uvf1_identify(radio):
raise errors.RadioError("Radio did not ack identification")
return ident
+
def uvf1_download(radio):
"""Download from TYT TH-UVF1"""
data = uvf1_identify(radio)
@@ -63,6 +65,7 @@ def uvf1_download(radio):
return memmap.MemoryMap(data)
+
def uvf1_upload(radio):
"""Upload to TYT TH-UVF1"""
data = uvf1_identify(radio)
@@ -91,6 +94,7 @@ def uvf1_upload(radio):
# End of clone?
radio.pipe.write("\x45")
+
THUV1F_MEM_FORMAT = """
struct mem {
bbcd rx_freq[4];
@@ -170,6 +174,7 @@ PTTID_LIST = ["Off", "BOT", "EOT", "Both"]
BCL_LIST = ["Off", "CSQ", "QT/DQT"]
CODES_LIST = [x for x in range(1, 9)]
+
@directory.register
class TYTTHUVF1Radio(chirp_common.CloneModeRadio):
"""TYT TH-UVF1"""
@@ -307,9 +312,8 @@ class TYTTHUVF1Radio(chirp_common.CloneModeRadio):
txmode, txval, txpol = self._decode_tone(_mem.tx_tone)
rxmode, rxval, rxpol = self._decode_tone(_mem.rx_tone)
- chirp_common.split_tone_decode(mem,
- (txmode, txval, txpol),
- (rxmode, rxval, rxpol))
+ chirp_common.split_tone_decode(
+ mem, (txmode, txval, txpol), (rxmode, rxval, rxpol))
mem.name = str(self._memobj.names[number - 1].name)
mem.name = mem.name.replace("\xFF", " ").rstrip()
@@ -335,8 +339,8 @@ class TYTTHUVF1Radio(chirp_common.CloneModeRadio):
mem.extra.append(rs)
rs = RadioSetting("scramble_code", "Scramble Code",
- RadioSettingValueList(CODES_LIST,
- CODES_LIST[_mem.scramble_code]))
+ RadioSettingValueList(
+ CODES_LIST, CODES_LIST[_mem.scramble_code]))
mem.extra.append(rs)
return mem
@@ -382,7 +386,7 @@ class TYTTHUVF1Radio(chirp_common.CloneModeRadio):
def get_settings(self):
_settings = self._memobj.settings
- group = RadioSettingGroup("basic", "Basic");
+ group = RadioSettingGroup("basic", "Basic")
top = RadioSettings(group)
group.append(
@@ -396,7 +400,7 @@ class TYTTHUVF1Radio(chirp_common.CloneModeRadio):
group.append(
RadioSetting("squelch", "Squelch Level",
- RadioSettingValueInteger(0, 9, _settings.squelch)))
+ RadioSettingValueInteger(0, 9, _settings.squelch)))
group.append(
RadioSetting("vox_level", "VOX Level",
diff --git a/tools/cpep8.blacklist b/tools/cpep8.blacklist
index 16d6347..26dab82 100644
--- a/tools/cpep8.blacklist
+++ b/tools/cpep8.blacklist
@@ -30,7 +30,6 @@
./chirp/drivers/th_uv3r25.py
./chirp/drivers/th_uvf8d.py
./chirp/drivers/thd72.py
-./chirp/drivers/thuv1f.py
./chirp/drivers/tmv71.py
./chirp/drivers/tmv71_ll.py
./chirp/drivers/vx170.py
More information about the chirp_devel
mailing list