[chirp_devel] MemoryMapBytes
Rick DeWitt AA0RD
Mon Jan 6 09:03:01 PST 2020
Dan-
The new py3 MemoryMapBytes method has a problem.
Firstly, the py2.7 bytes() call is just an alias for string(), so it
does not generate a byte array.
I had to convert the data string to an integer list in order for
MemoryMapBytes to accept it. Otherwise it generates an error.
in sync_in-- this works
bdata = []
for bx in data: # memory hog
bdata.append(ord(bx))
self._mmap = memmap.MemoryMapBytes(bdata) # For py3
self.process_mmap()
This does not work; generates "integer required" error -
bdata = bytes(data)
self._mmap = memmap.MemoryMapBytes(bdata)
Likewise if I convert the USB string data reads to bytes() in the
download function; still bombs -
bdata = bytes()
bdata.append = bytes(xxx)
...
self._mmap = memmap.MemoryMapBytes(bdata)
--
Rick DeWitt
AA0RD
Sequim, Washington, USA 98382
(360) 681-3494
More information about the chirp_devel
mailing list