emmebrusa / TSDZ2-Smart-EBike-1

TSDZ2 Open Source Firmware adapted to VLCD5-VLCD6-XH18 displays
GNU General Public License v3.0
131 stars 35 forks source link

Parse/write directly to src/controller/config.h instead of ini #93

Open dzid26 opened 2 months ago

dzid26 commented 2 months ago

ini files are meaningless.

I would appreciate more if Java GUI was parsing the src/controller/config.c directly without creating intermediary ini files.

The advantages:

The backups ("experimental settings") and "proven settings" of config.h could be stored as usual. Also, settings should be stored together with the backed up binary in \releases\backup

ec-bikes commented 2 months ago

It seems like part of the purpose with ini files was to allow saving/loading multiple sets of settings, though I guess you could do the same with C header files (the GUI would just need to copy the right one into place before flashing). Another idea would be saving the settings in a different format such as JSON which at least includes names with the values.

dzid26 commented 2 months ago

Hmm,

emmebrusa commented 2 months ago

Yes, it would have been better to have a single file, but unfortunately there are two. Changing now is complicated and I don't see much benefit for the user. Also we should maintain compatibility with current .ini files, don't you think?

For those who want to contribute, there is a change that I think is more useful, instead of using File Explorer to move the files from the "experimental settings" folder to the "proven settings" folder and renaming them, be able to do it directly in the configurator. It's on the list of things to do, the last one.

emmebrusa commented 1 month ago

Copying files from "experimental settings" folder to "proven settings", implemented. It will be in the next version.