Welcome! Log In Create A New Profile

Advanced

Machine Parse-able configuration(_adv).h files

Posted by DaHai8 
Machine Parse-able configuration(_adv).h files
August 11, 2018 08:15AM
Can't seem to find a place to post Ideas instead of Help requests, so I guess here is as good as any.

I know there are web-apps that help users change settings in configuration.h and configuration_adv.h as those files have become very large, wordy, and the format and options change a lot from release to release. But I suspect that maintaining those apps is difficult as there really is no 'fixed' format to the files and the comments and options are varied, numerous or sparse.

So my idea would be to create a fixed format for configuration.h and configuration_adv.h with embedded machine parse-able data so that apps could parse the files and present the user with up-to-date information on each setting and their valid options and ballon-help descriptions. Done properly, this format would be self-documenting and instantly parse-able by the app without have to re-code it.

For instance:
//c For direct drive extruder v9 set to true, for geared extruder set to false.
//i Sets the direction of the motor for the extruder. Direct drive is typically 'true', geared is typically 'false'
//o 'true','false'
//e no
#define INVERT_E0_DIR true

The app would read:
'//c' and know its a programmers comment.
'//i' and present the following text as pop-up help
'//o' as options, either as a list of text items separated by commas, or number ranges {1...100}, or any number {...}, etc...
'//e' would indicate if this option can be enabled or disabled
And then finally the setting itself, which is always:
#define SETTING_NAME
If the #define had // in front, then of course it would present that to the user an a setting to enable or leave disabled.

I know there is a lot more to this that what I've briefly covered here, and some of it can probably get pretty complicated.

And this 'format' I've thrown together here is just a rough cut. Just an example of the concept.

Is there an appetite for this type of revising of the standard settings in Marlin to make it easier to set this up and possibly help with migrating from version to version?

If so, who would I get in touch with to work out something like this? I'd like to contribute to Marlin in this way if there is real interest here.

Thanks!
Re: Machine Parse-able configuration(_adv).h files
August 16, 2018 03:06AM
For the purpose of this post I will not share alternative solutions to yours (because I do not have any haha). The idea is good, and if this was implemented could be of value.

The question is, do the pros outweigh the cons?

The reason for my response to your post is to just mention that they are busy with a Marlin version 2. This includes some serious reformatting (as far as I know), and maybe even some refactoring. Perhaps a good option is to refer this link to the great/good/awesome contributors of Marlin on Github. They are most certainly the best people to ask. Do note that the Github contributors suggest all questions be raised here on this forum, and a few other places. So maybe that could lead you to other ways of making them aware of your suggestion.

Peace.
Sorry, only registered users may post in this forum.

Click here to login