[chirp_devel] "special memory" and Yaesu FT1D/FT2D
NNN Wx
Sat Oct 14 18:38:59 PDT 2017
Here I am asking the chirp developer community for help still (again?) I’m quite the Python ignoramus, although I did get enough done to have the Yaesu FT2D driver mostly work (only because the FT1D driver worked well already!) If you can help please be gentle and don’t assume that I actually know anything.
I’m trying to arrange for chirp to allow the Yaesu FT1D and its dependent driver for FT2D to have preset, fixed memory channels. The radios can do this; chirp breaks when it encounters such presets stored in the banks. I’m stumped by the multiple options to do this, and none of my guesses are correct yet. So I beg for help, at least for more understanding.
Status: The radios support multiple preset memory locations that don’t reside in programmable memory. (They include Weather channels, International Maritime and Shortwave broadcasts; they are not changeable.) These locations can be copied to real memories but they can also be referenced directly in memory banks. They do not have the same quantity of properties that other memory channels do; AFAICT, they only have a frequency, offset and mode (AM or FM.) If the user has defined a bank to use a preset in the radio, the index used is well outside any valid location and chirp won’t process that memory bank any further. I can make chirp not die by masking out the bits that indicate that these presets are being used, but that isn’t correct behavior (it’ll point to a memory location.) I can make chirp work by deleting those preset locations by hand in the radio, but that’s not correct behavior either (chirp shouldn’t break when it encounters a validly programmed radio.) Even if I could get the FT1D model to work correctly, the UI will still need fixing to be able to add and remove presets from the bank mappings.
Now, I think I can redo the FT1D channel/bank model to admit that there are five bits of flags in the channels (11 out of 16 bits are the index into the channel or memory.) But then I’ve no idea how that would work in the UI section of chirp/ui/bankedit.py. I can’t even spend enough time to figure out how that part of the system even works at all. I’ve tried!
I find that the memory UI “Special Channels” button may do pretty much exactly what is needed. For the FT817, that button adds the “locations” named according to “SPECIAL_MEMORIES” mapping in the FT817 code. To activate the “Special Memories” button in the code, one needs to define “rf.valid_special_chans” in the settings, and put the indices for the location names into that set. Wow, the UI is already set to handle those cases, at least in the “memories” UI tab, but I don’t think it is active in the “Banks” UI tab [I can’t tel yet: FT817 has no banks and FT1D has no Special Memories at the moment.] I’d love to just tell the FT1D to have rf.valid_special_chans and to have them optionally appear amongst the locs described in the “Banks” tab. But merely defining that setting in a manner similar to the FT817 seems to break chirp on the FT2D: it becomes unable to use old FT2D .img files for lack of a SPECIAL_MEMORIES mapping in the previous .img file. Anyway “Special Memories” button doesn’t show in the "Banks” tab, so those locs won’t show or be accessed there. Further, I cannot find how the frequencies and other data are defined for the FT817 “Special Channels”, even though they’re displayed in the chirp UI (I used the FT817 test image.) They’re not strictly needed to make this work but it’d be nice.
So here are some specific questions for the community:
- Is there any overall architectural documentation and object model description for chirp? Trying to figure out who calls what and when by simply reading the source (RTS) and then doing dumb things to cause error tracebacks is not very efficient.
- how does bankedit.py actually understand locs and banks to drive the UI? what magic subroutine calls and exactly what data structures are being used? The FT1D driver seems to have multiple levels and directions of location-to-bank mappings: which ones are actually effective at the UI level and how? That’s important to know how to manage away the flags and keep the channel numbers.
- does rf.valid_special_chans have to hold a set of numbers that are actually part of the chirp memory model? Can they point to locations that are fixed somehow by the driver and not be changeable by chirp? Since in the FT1D they’re not anywhere in the programmable memory, can one activate the functionality without breaking the use of old .img files? It appears to me that these valid_special_chans are being defined as negative memory addresses in the FT817 and only some of them are special-cased in the driver software as far as I can tell.
- What’s “the right way” to duplicate a “Special Memories” functionality onto the “Banks” UI? And make it work as it does in the Memories UI? And not break every other radio that uses bankedit.py?
Thanks in advance for any enlightenment.
Declan Rieb WD5EQY
wd5eqy at arrl.net
More information about the chirp_devel
mailing list