# HG changeset patch # User Zachary T Welch zach@mandolincreekfarm.com # Fake Node ID 5e18f6ecdc3ee6977aad73f10b710c939bdb5a5d
Fix style issues in ic2100.py (#2355)
diff --git a/chirp/drivers/ic2100.py b/chirp/drivers/ic2100.py index 8babe50..7525ebf 100644 --- a/chirp/drivers/ic2100.py +++ b/chirp/drivers/ic2100.py @@ -90,10 +90,11 @@ struct {
TMODES = ["", "Tone", "", "TSQL"] DUPLEX = ["", "", "+", "-"] -STEPS = [5.0, 10.0, 12.5, 15.0, 20.0, 25.0, 30.0, 50.0] +STEPS = [5.0, 10.0, 12.5, 15.0, 20.0, 25.0, 30.0, 50.0] +
def _get_special(): - special = { "C": 506 } + special = {"C": 506} for i in range(0, 3): ida = "%iA" % (i + 1) idb = "%iB" % (i + 1) @@ -103,6 +104,7 @@ def _get_special():
return special
+ def _get_freq(mem): freq = (int(mem.freq) * 100000) + \ (mem.freq_10khz * 10000) + \ @@ -122,6 +124,7 @@ def _get_freq(mem):
return freq
+ def _set_freq(mem, freq): mem.freq = freq / 100000 mem.freq_10khz = (freq / 10000) % 10 @@ -129,6 +132,7 @@ def _set_freq(mem, freq): mem.freq_1khz = khz mem.is_12_5 = chirp_common.is_12_5(freq)
+ def _get_offset(mem): raw = memmap.MemoryMap(mem.get_raw()) if ord(raw[5]) & 0x0A: @@ -141,6 +145,7 @@ def _get_offset(mem): else: return int(mem.offset) * 1000
+ def _set_offset(mem, offset): if (offset % 10) == 5000: extra = 0x0A @@ -153,9 +158,11 @@ def _set_offset(mem, offset): raw[5] = ord(raw[5]) | extra mem.set_raw(raw.get_packed())
+ def _wipe_memory(mem, char): mem.set_raw(char * (mem.size() / 8))
+ @directory.register class IC2100Radio(icf.IcomCloneModeRadio): """Icom IC-2100""" @@ -227,7 +234,7 @@ class IC2100Radio(icf.IcomCloneModeRadio): mem.ctone = chirp_common.TONES[_mem.ctone] mem.tmode = TMODES[_mem.tmode] mem.duplex = DUPLEX[_mem.duplex] - + mem.extra = RadioSettingGroup("Extra", "extra")
rs = RadioSetting("anm", "Alphanumeric Name", diff --git a/tools/cpep8.blacklist b/tools/cpep8.blacklist index 75faa3a..bc24f43 100644 --- a/tools/cpep8.blacklist +++ b/tools/cpep8.blacklist @@ -1,7 +1,6 @@ # cpep8.blacklist: The list of files that do not meet PEP8 standards. # DO NOT ADD NEW FILES!! Instead, fix the code to be compliant. # Over time, this list should shrink and (eventually) be eliminated. -./chirp/drivers/ic2100.py ./chirp/drivers/ic2200.py ./chirp/drivers/ic2720.py ./chirp/drivers/ic2820.py