- Posts: 1433
RFC model*.ini: How to deal with changes?
- rbe2012
- Topic Author
- Offline
- So much to do, so little time...
Less
More
02 Feb 2013 15:58 #5911
by rbe2012
RFC model*.ini: How to deal with changes? was created by rbe2012
I am quite sure that this was discussed at the edge of another thread, but I didn't find it again... But it seems to gain some importance.
I came to this with the extensions I coded for ToggeleIcons and vSwitches. Both add new functionalities to the firmware and are related to the model config. So they should be written in the modelXX.ini.
But if done so, other versions of deViation might be confused about that. So from my point of view there should be a guideline how to deal with additions.
There are many ways to handle this. Just two:
I came to this with the extensions I coded for ToggeleIcons and vSwitches. Both add new functionalities to the firmware and are related to the model config. So they should be written in the modelXX.ini.
But if done so, other versions of deViation might be confused about that. So from my point of view there should be a guideline how to deal with additions.
There are many ways to handle this. Just two:
- Indroduce version numbers to the model files and a user controlled method of converting them to each other version (as far as useful), either in the tx or on PC.
- Every addition defines its own section/subsection and attribute names which are unique. These should be ignored by versions of deViation which do not make use of them. This sould make sure, that a model file is interpreted correctly in every version while the additions can be used. One problem might be that the old values are not configured when the new are so using a newer model file with an older version leaves some aspects uninitialized. Another problem is that only known values are stored in the model object and so they are not written back to the file when saving.
- When a model-file was recognized as from the old firmware, don't offer the new possibilities
- When a model-file was recognized as from the old firmware, don't save the new assignments when the file is written (just the rest of the config and the old values)
- When a model-file was recognized as from the old firmware, convert it either automatically or after user's confirmation
- When the tx is booted, check all model files for older versions and convert them, either automatically or after user's confirmation
- Take some PC based tool to convert between the different version
Please Log in or Create an account to join the conversation.
Time to create page: 0.053 seconds
- Home
- Forum
- Development
- Development
- RFC model*.ini: How to deal with changes?