[chirp_devel] [PATCH] [all Wouxun] Add busy channel lockout in memory editor
Marco Filippi IZ3GME
Tue Sep 18 06:05:41 PDT 2012
# HG changeset patch
# User Marco Filippi <iz3gme.marco at gmail.com>
# Date 1347973450 -7200
# Node ID 187fe4c394f6f1bee058a9cfa3229c332d8f5561
# Parent 8b326e20aa6b87b75e5bc48d50b7a3781542b27c
[all Wouxun] Add busy channel lockout in memory editor
implement feature #309
diff --git a/chirp/wouxun.py b/chirp/wouxun.py
--- a/chirp/wouxun.py
+++ b/chirp/wouxun.py
@@ -376,6 +376,12 @@
break
mem.name += CHARSET[i]
+ mem.extra = RadioSettingGroup("Extra", "extra")
+ bcl = RadioSetting("BCL", "bcl",
+ RadioSettingValueBoolean(bool(_mem.bcl)))
+ bcl.set_doc("Busy Channel Lockout")
+ mem.extra.append(bcl)
+
return mem
def _set_tone(self, mem, _mem):
@@ -445,9 +451,6 @@
else:
_mem.power_high = True
- # Default to disabling the busy channel lockout
- _mem.bcl = 0
-
_nam.name = [0xFF] * 6
for i in range(0, len(mem.name)):
try:
@@ -455,6 +458,9 @@
except IndexError:
raise Exception("Character `%s' not supported")
+ for setting in mem.extra:
+ setattr(_mem, setting.get_shortname(), setting.value)
+
@classmethod
def match_model(cls, filedata, filename):
# New-style image (CHIRP 0.1.12)
More information about the chirp_devel
mailing list