[chirp_devel] Read/Write SD-card?
What’s the best way to convince a driver to read and write from an SD card, while not breaking the existing read/write to .img and radio-specific files?
The SD card has a file (BACKUP.dat) that is essentially a binary image of the radio’s memory. It looks to me as if CHIRP can read and write such a file (e.g., FileBackedRadio() is not quite defined, and load_mmap() and save_mmap() look to do the right thing as long as the file enclitic is not .img)
The driver already has one call to directory.register_format to introduce its radio-specific files. And the save dialog allows me to choose CHIRP .img or radio-specific formats. I’d like to add read/write from the raw memory image.
What magic is needed to get CHIRP and wxui to handle my radio’s second method of data transfer, via SD card??
[There is a probable workaround: modify a copy of the SD card file: prepend the “correct” eight characters to the memory-image file, and ensure that there’s no MAGIC or glob at the end, and it should read as if it were a .img, no?]
Thanks.
______ Declan Rieb WD5EQY wd5eqy@arrl.net
What’s the best way to convince a driver to read and write from an SD card, while not breaking the existing read/write to .img and radio-specific files?
As you note, I already added support for the ADMS file formats. Just add another item to register for another extension/format here:
https://github.com/kk7ds/chirp/blob/master/chirp/drivers/ft1d.py#L716
and add another handler here:
https://github.com/kk7ds/chirp/blob/master/chirp/drivers/ft1d.py#L2572
for the other file format. Just like the ADMS support in save_mmap() if you do it yourself (and don't call super().save_mmap()) then you won't get the rest of the chirp image metadata at the end.
--Dan
participants (2)
-
Dan Smith
-
Declan Rieb