[chirp_devel] [PATCH] [UV-5R] Leave Immutable Elements Alone

Jim Unroe
Sun Feb 14 14:31:16 PST 2016


# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1455485046 18000
# Node ID d6525ea2beb05e9da2751d7b0dff3ef24f00e268
# Parent  9752a42d4a0d0dc7917d033b85a0840c4c51cf6f
[UV-5R] Leave Immutable Elements Alone

Some immutable (set_mutable(False)) elements that were expected to be
unchangeable by the user were being changed by CHIRP when filtered and then
they were being updated by the "def set_settings(self, settings):" procedure.

This patch updates this procedure so it does not reset immutable elements.

related to bug #3305

diff -r 9752a42d4a0d -r d6525ea2beb0 chirp/drivers/uv5r.py
--- a/chirp/drivers/uv5r.py	Mon Feb 08 14:14:28 2016 +0000
+++ b/chirp/drivers/uv5r.py	Sun Feb 14 16:24:06 2016 -0500
@@ -1574,7 +1574,7 @@
                     if element.has_apply_callback():
                         LOG.debug("Using apply callback")
                         element.run_apply_callback()
-                    else:
+                    elif element.value.get_mutable():
                         LOG.debug("Setting %s = %s" % (setting, element.value))
                         setattr(obj, setting, element.value)
                 except Exception, e:



More information about the chirp_devel mailing list