[chirp_devel] [PATCH 0 of 1 ] BF-888 BCL and Scramble - second try
I elaborated the commit message a little more, for me there's still some obscure pythonic magic in this bug but at least it should be clear that both not setting.value not bool(setting.value) doesn't work
73 de IZ3GME Marco
# HG changeset patch # User Marco Filippi iz3gme.marco@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
participants (1)
-
Marco Filippi IZ3GME