[chirp_devel] [PATCH] Driver Maintenance: uv6r.py
# HG changeset patch # User Jim Unroe rock.unroe@gmail.com # Date 1609527335 18000 # Fri Jan 01 13:55:35 2021 -0500 # Node ID 829aa26aa81f9409e7b398872f3c48b24370a486 # Parent 9cc4b30bd7b041a697e60530f83b778e65b2cef7 Driver Maintenance: uv6r.py
1. Add to PEP8 manifest 2. Perform PEP8 cleanup
fixes #8631
diff -r 9cc4b30bd7b0 -r 829aa26aa81f chirp/drivers/uv6r.py --- a/chirp/drivers/uv6r.py Fri Jan 01 00:05:36 2021 -0500 +++ b/chirp/drivers/uv6r.py Fri Jan 01 13:55:35 2021 -0500 @@ -19,8 +19,6 @@ import logging import re
-LOG = logging.getLogger(__name__) - from chirp.drivers import baofeng_common from chirp import chirp_common, directory, memmap from chirp import bitwise, errors, util @@ -31,14 +29,16 @@ InvalidValueError from textwrap import dedent
-##### MAGICS ######################################################### - +LOG = logging.getLogger(__name__) + +# #### MAGICS ######################################################### + # Baofeng UV-6R magic string -MSTRING_UV6R = "\x50\xBB\xFF\x20\x14\x11\x22" - -##### ID strings ##################################################### - -# Baofeng UV-6R +MSTRING_UV6R = "\x50\xBB\xFF\x20\x14\x11\x22" + +# #### ID strings ##################################################### + +# Baofeng UV-6R UV6R_fp1 = " BF230#1" UV6R_fp2 = " BF230#2"
@@ -70,6 +70,7 @@ LIST_VOICE = ["Off", "English", "Chinese"] LIST_WORKMODE = ["Frequency", "Channel"]
+ def model_match(cls, data): """Match the opened/downloaded image to the correct version""" match_rid1 = False @@ -125,7 +126,6 @@ PTTID_LIST = LIST_PTTID SCODE_LIST = LIST_SCODE
- MEM_FORMAT = """ #seekto 0x0000; struct { @@ -418,7 +418,7 @@ basic.append(rs)
rs = RadioSetting("settings.beep", "Beep", - RadioSettingValueBoolean(_mem.settings.beep)) + RadioSettingValueBoolean(_mem.settings.beep)) basic.append(rs)
if _mem.settings.timeout > 0x27: @@ -523,7 +523,7 @@ val = _mem.settings.rpste rs = RadioSetting("settings.rpste", "Squelch Tail Eliminate (repeater)", - RadioSettingValueList( + RadioSettingValueList( LIST_RPSTE, LIST_RPSTE[val])) basic.append(rs)
@@ -645,12 +645,12 @@
rs = RadioSetting("wmchannel.mrcha", "MR A Channel", RadioSettingValueInteger(0, 127, - _mem.wmchannel.mrcha)) + _mem.wmchannel.mrcha)) work.append(rs)
rs = RadioSetting("wmchannel.mrchb", "MR B Channel", RadioSettingValueInteger(0, 127, - _mem.wmchannel.mrchb)) + _mem.wmchannel.mrchb)) work.append(rs)
def convert_bytes_to_freq(bytes): @@ -845,7 +845,7 @@ key = "squelch.sql%i" % (index) _obj = self._memobj.squelch val = RadioSettingValueInteger(0, 123, - getattr(_obj, "sql%i" % (index))) + getattr(_obj, "sql%i" % (index))) if index == 0: val.set_mutable(False) name = "Squelch %i" % (index) diff -r 9cc4b30bd7b0 -r 829aa26aa81f tools/cpep8.manifest --- a/tools/cpep8.manifest Fri Jan 01 00:05:36 2021 -0500 +++ b/tools/cpep8.manifest Fri Jan 01 13:55:35 2021 -0500 @@ -101,6 +101,7 @@ ./chirp/drivers/ts590.py ./chirp/drivers/uv5r.py ./chirp/drivers/uv5X3.py +./chirp/drivers/uv6r.py ./chirp/drivers/uvb5.py ./chirp/drivers/vx170.py ./chirp/drivers/vx2.py
participants (1)
-
Jim Unroe