[chirp_devel] [PATCH] [vx6] Fix valid/used flag logic so new memories are valid and unmasked. #687

Tom Hayward
Wed Mar 13 09:01:43 PDT 2013


# HG changeset patch
# User Tom Hayward <tom at tomh.us>
# Date 1363190454 25200
# Node ID 62b838b06c9686855994d58d8e6dd69e2367de02
# Parent  fa1ac806391ea053a903ca6dd64eb5508b3b88c0
[vx6] Fix valid/used flag logic so new memories are valid and unmasked. #687

diff -r fa1ac806391e -r 62b838b06c96 chirp/vx6.py
--- a/chirp/vx6.py	Wed Mar 13 11:20:02 2013 +1100
+++ b/chirp/vx6.py	Wed Mar 13 09:00:54 2013 -0700
@@ -141,7 +141,8 @@
         return rf
 
     def get_raw_memory(self, number):
-        return repr(self._memobj.memory[number-1])
+        return repr(self._memobj.memory[number-1]) + \
+            repr(self._memobj.flags[(number-1)/2])
 
     def get_memory(self, number):
         _mem = self._memobj.memory[number-1]
@@ -197,7 +198,8 @@
         valid = _flag["%s_valid" % nibble]
 
         # initialize new channel to safe defaults
-        if not mem.empty and not used:
+        if not mem.empty and not valid:
+            _flag["%s_valid" % nibble] = True
             _mem.unknown11 = 0
             _mem.step_changed = 0
             _mem.cpu_shifted = 0



More information about the chirp_devel mailing list