[chirp_devel] [PATCH] [IC-7000] Fix Show Raw Memory #3127

Joseph.P.Scanlan at n7xsd.us
Mon Jan 4 14:09:04 PST 2016


# HG changeset patch
# User <Joseph.P.Scanlan at n7xsd.us>
# Date 1451945185 28800
#      Mon Jan 04 14:06:25 2016 -0800
# Node ID 0dab2109bbd98b0f0603f46f408569ab1463d232
# Parent  3f109fefa33d647b8c30f7d08e7f61ae9fe5ec5e
[IC-7000] Fix Show Raw Memory #3127

Method “get_raw_memory” was overlooked when bank support was added to the IC-7000 (an Icom CI-V radio).  This patch corrects that oversight.

diff -r 3f109fefa33d -r 0dab2109bbd9 chirp/drivers/icomciv.py
--- a/chirp/drivers/icomciv.py	Sun Jan 03 14:23:15 2016 -0800
+++ b/chirp/drivers/icomciv.py	Mon Jan 04 14:06:25 2016 -0800
@@ -256,10 +256,19 @@
 
     def get_raw_memory(self, number):
         f = self._classes["mem"]()
-        f.set_location(number)
+        if self._rf.has_bank:
+            ch, bnk = self.mem_to_ch_bnk(number)
+            f.set_location(ch, bnk)
+            loc = "bank %i, channel %02i" % (bnk, ch)
+        else:
+            f.set_location(number)
+            loc = "number %i" % number
         self._send_frame(f)
         f.read(self.pipe)
-        return repr(f.get_obj())
+        if f.get_data() and f.get_data()[-1] == "\xFF":
+            return "Memory " + loc + " empty."
+        else:
+            return repr(f.get_obj())
 
 # We have a simple mapping between the memory location in the frequency
 # editor and (bank, channel) of the radio.  The mapping doesn't


More information about the chirp_devel mailing list