[chirp_devel] [PATCH 1 of 1] [BF-888] Fix BCL and Scramble editing

Marco Filippi IZ3GME
Thu Apr 17 00:39:06 PDT 2014


# HG changeset patch
# User Marco Filippi <iz3gme.marco at gmail.com>
# Date 1397719815 -7200
#      gio apr 17 09:30:15 2014 +0200
# Node ID 74f00224b7809efb3d1b2e0297fdfd482a4daec0
# Parent  e51624d6ad4b7cb72a3554356d71f26cfe503adb
[BF-888] Fix BCL and Scramble editing

BCL and Scramble was always enabled on edited memories because
setting.values is of <type 'instance'> so not setting.values as well as
not(bool(setting.values)) always return false, coerce to int instead pickup the
value of the instance so not(int(setting.values)) do the job

Fix #1549

diff --git a/chirp/h777.py b/chirp/h777.py
--- a/chirp/h777.py
+++ b/chirp/h777.py
@@ -379,7 +379,7 @@
 
         for setting in mem.extra:
             # NOTE: Only two settings right now, both are inverted
-            setattr(_mem, setting.get_name(), not setting.value)
+            setattr(_mem, setting.get_name(), not bool(setting.value))
 
     def get_settings(self):
         _settings = self._memobj.settings



More information about the chirp_devel mailing list