- Posts: 54
Comments in Model INI files?
- myxiplx
- Topic Author
- Offline
Less
More
12 Apr 2013 11:33 #8890
by myxiplx
Comments in Model INI files? was created by myxiplx
Hi folks,
Can I ask if it's possible to add comments to model.ini files? I'm new to Deviation and it would be a huge help if I could add comments to the various mixers to help me understand them more easily. Mainly what I want to do is document the input source, the switch modifiers, and what each output channel relates to for that model.
Apologies if this has been asked before, I had a look but couldn't find if this was possible.
Cheers,
Ross
Can I ask if it's possible to add comments to model.ini files? I'm new to Deviation and it would be a huge help if I could add comments to the various mixers to help me understand them more easily. Mainly what I want to do is document the input source, the switch modifiers, and what each output channel relates to for that model.
Apologies if this has been asked before, I had a look but couldn't find if this was possible.
Cheers,
Ross
Please Log in or Create an account to join the conversation.
- FDR
- Offline
12 Apr 2013 11:47 #8892
by FDR
Replied by FDR on topic Comments in Model INI files?
Usually a comment line starts with a semicolon (";") in an ini file, however deviation rewites the whole model.ini file on a save, so your comments will be lost...
Please Log in or Create an account to join the conversation.
- RandMental
- Offline
Less
More
- Posts: 521
12 Apr 2013 11:51 #8893
by RandMental
Replied by RandMental on topic Comments in Model INI files?
I have also identified this need, specifically around the assignment of icons.
Perhaps we should start with document starting with the keys without obvious names and those not written by or settable from the GUI?
Perhaps we should start with document starting with the keys without obvious names and those not written by or settable from the GUI?
Please Log in or Create an account to join the conversation.
- rbe2012
- Offline
- So much to do, so little time...
Less
More
- Posts: 1433
12 Apr 2013 12:32 #8894
by rbe2012
Replied by rbe2012 on topic Comments in Model INI files?
It is not as easy as it seems. Allowing comments is easy, but as FDR noticed they were not rewritten when the config has changed and is saved.
So for keeping the comments we would have to parse the original file while writing to it (not possible because we could write a position behind the read pointer dependent of the values to be written), we would keep the old file for reading and write the new config to a new file (not possible because the file system used does not allow file creating - possible solution: copy to a dummy file) or we have to save the comments somewhere in the RAM (could be hard on limited hardware like 7e).
And we would have to keep the position of the comment as well - this could be done because the order of the values written is constant.
Another idea I had earlier, but have not really thought about: a regular field in the gui where I can write individual text and which is saved with the model or perhaps in addition to the modelXX.ini (say "hintsXX.ini") - the second could work also on limited hardware because the text must not be kept in RAM. But every file costs 4kB of flash (even if empty) - can lead to a lack of resources too.
So for keeping the comments we would have to parse the original file while writing to it (not possible because we could write a position behind the read pointer dependent of the values to be written), we would keep the old file for reading and write the new config to a new file (not possible because the file system used does not allow file creating - possible solution: copy to a dummy file) or we have to save the comments somewhere in the RAM (could be hard on limited hardware like 7e).
And we would have to keep the position of the comment as well - this could be done because the order of the values written is constant.
Another idea I had earlier, but have not really thought about: a regular field in the gui where I can write individual text and which is saved with the model or perhaps in addition to the modelXX.ini (say "hintsXX.ini") - the second could work also on limited hardware because the text must not be kept in RAM. But every file costs 4kB of flash (even if empty) - can lead to a lack of resources too.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
Less
More
- Posts: 4402
12 Apr 2013 13:14 #8898
by PhracturedBlue
Replied by PhracturedBlue on topic Comments in Model INI files?
As rbe says, supporting comments is just not realistic here. Ifyou are modifying an ini file byhand, you are by definition an advanced user. Documenting theini file is probably a worthy goal to help those people.
Please Log in or Create an account to join the conversation.
- RandMental
- Offline
Less
More
- Posts: 521
12 Apr 2013 14:51 #8900
by RandMental
I agree, it is not needed on the TX but a document would help.
Replied by RandMental on topic Comments in Model INI files?
PhracturedBlue wrote: As rbe says, supporting comments is just not realistic here. Ifyou are modifying an ini file by hand, you are by definition an advanced user. Documenting the ini file is probably a worthy goal to help those people.
I agree, it is not needed on the TX but a document would help.
Please Log in or Create an account to join the conversation.
Time to create page: 0.036 seconds
- Home
- Forum
- News, Announcements and Feedback
- Feedback & Questions
- Comments in Model INI files?