[chirp_devel] Memory and RadioSettings
Hello again!
Working on the Alinco DJ-500 (that runs some Anytone protocol), I came across Memory and Memory.extra.
When I saw the nice RadioSettingValue classes I thought I missed something in Memory. Memory.extra takes a RadioSettingsGroup with all the nice checks and ranges etc. Still the base attributes of Memory are plain types with some manual checking and mapping you have to do, with _valid_map to check the values. Then when writing back your data from Memory you have to do quite some error prone and mechanic wiring, that seem refactorable to me.
settings.py is copyrighted 2012, quite some time after the 2008 chirp_common, so I guess this was a later effort to create some more elaborate value handling. I have the impression that this did not make it to the standard attributes of Memory, and that this would need very careful work to not break old drivers. I could also think of some ways to wire memory handling (in my case, no experience with other radio types) by implementing mapping functions.
Any ideas or enlightenment from the regular contributors?
73 de Patrick OE6PSE
settings.py is copyrighted 2012, quite some time after the 2008 chirp_common, so I guess this was a later effort to create some more elaborate value handling. I have the impression that this did not make it to the standard attributes of Memory, and that this would need very careful work to not break old drivers. I could also think of some ways to wire memory handling (in my case, no experience with other radio types) by implementing mapping functions.
I never had any intention to replace the base properties on the memory with those values. The "extra" settings are basically considered to be "incompatible things we'll never try to copy between dissimilar models", but that is not true of the base properties, which need to be pretty solid in order to (a) not break other drivers and (b) make it easy to set a memory from one model into another. The mechanism by which the validation happens could be modernized for sure, but I don't really want to make the properties (easily) override-able by the drivers for fear of creating incompatible (at the base attribute level) between models.
--Dan
participants (2)
-
Dan Smith
-
Patrick Strasser-Mikhail OE6PSE