[chirp_devel] [PATCH] Driver Maintenance: mursv1.py
Jim Unroe
Thu Dec 31 19:30:09 PST 2020
# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1609471754 18000
# Thu Dec 31 22:29:14 2020 -0500
# Node ID 4875b98c7c39959e200b63e4f58ee1279731a42c
# Parent 1b1ea7a628879e699c2707422932102d345d8a09
Driver Maintenance: mursv1.py
1. Add to PEP8 manifest
2. Perform PEP8 cleanup
fixes #8619
diff -r 1b1ea7a62887 -r 4875b98c7c39 chirp/drivers/mursv1.py
--- a/chirp/drivers/mursv1.py Thu Dec 31 22:15:12 2020 -0500
+++ b/chirp/drivers/mursv1.py Thu Dec 31 22:29:14 2020 -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,12 +29,14 @@
InvalidValueError
from textwrap import dedent
-##### MAGICS #########################################################
+LOG = logging.getLogger(__name__)
+
+# #### MAGICS #########################################################
# BTECH MURS-V1 magic string
MSTRING_MURSV1 = "\x50\x5F\x20\x15\x12\x15\x4D"
-##### ID strings #####################################################
+# #### ID strings #####################################################
# BTECH MURS-V1
MURSV1_fp1 = "USM2402"
@@ -70,6 +70,7 @@
MURS_FREQS = [151.820, 151.880, 151.940, 154.570, 154.600] * 3
FM_MODE = [3, 4, 8, 9, 13, 14]
+
def model_match(cls, data):
"""Match the opened/downloaded image to the correct version"""
rid = data[0x1EF0:0x1EF7]
@@ -150,7 +151,6 @@
return rf
-
MEM_FORMAT = """
#seekto 0x0010;
struct {
@@ -590,7 +590,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:
@@ -698,7 +698,7 @@
rs = RadioSetting("settings.rogerrx", "Roger Beep (RX)",
RadioSettingValueList(
LIST_OFFAB, LIST_OFFAB[
- _mem.settings.rogerrx]))
+ _mem.settings.rogerrx]))
basic.append(rs)
# Advanced settings
@@ -771,12 +771,12 @@
rs = RadioSetting("wmchannel.mrcha", "MR A Channel",
RadioSettingValueInteger(1, 15,
- _mem.wmchannel.mrcha))
+ _mem.wmchannel.mrcha))
work.append(rs)
rs = RadioSetting("wmchannel.mrchb", "MR B Channel",
RadioSettingValueInteger(1, 15,
- _mem.wmchannel.mrchb))
+ _mem.wmchannel.mrchb))
work.append(rs)
# broadcast FM settings
@@ -847,7 +847,7 @@
key = "squelch.vhf.sql%i" % (index)
_obj = self._memobj.squelch.vhf
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 1b1ea7a62887 -r 4875b98c7c39 tools/cpep8.manifest
--- a/tools/cpep8.manifest Thu Dec 31 22:15:12 2020 -0500
+++ b/tools/cpep8.manifest Thu Dec 31 22:29:14 2020 -0500
@@ -72,6 +72,7 @@
./chirp/drivers/kyd.py
./chirp/drivers/leixen.py
./chirp/drivers/lt725uv.py
+./chirp/drivers/mursv1.py
./chirp/drivers/puxing.py
./chirp/drivers/radioddity_r2.py
./chirp/drivers/retevis_rt22.py
More information about the chirp_devel
mailing list