[chirp_devel] [PATCH] [ft8x7] check that unused memories marked as non empty have been initialized

Marco Filippi IZ3GME
Sun Sep 14 09:03:28 PDT 2014


# HG changeset patch
# User Marco Filippi <iz3gme.marco at gmail.com>
# Date 1410710578 -7200
#      dom set 14 18:02:58 2014 +0200
# Node ID 7b0bf042958f6373f61a638d96455df8aaee3606
# Parent  30bc50987c8aefd79a7582714308385f037b2205
[ft8x7] check that unused memories marked as non empty have been initialized

In an image from a user we found some unused memories marked as non empty that
have not been initialized with valid data (they are filled by binary 1s).
We don't know how to create such a memory but checking that freq field contains
valid data is always safe.

fix #1909

diff --git a/chirp/ft817.py b/chirp/ft817.py
--- a/chirp/ft817.py
+++ b/chirp/ft817.py
@@ -599,7 +599,7 @@
         mem.number = number
         if not used:
             mem.empty = True
-            if not valid:
+            if not valid or _mem.freq == 0xffffffff:
                 return mem
 
         return self._get_memory(mem, _mem)



More information about the chirp_devel mailing list