Add JSON settings definition format and conversion to C code
TjazVracko opened this issue · 1 comments
TjazVracko commented
Context
a JSON file defines each setting (id, key, type, default value).
Some Kconfig option enables JSON->C code conversion (probably one with the relative path to JSON and one to enable the conversion).
The code will read the JSON and generate applicable user_settings_add
functions, so they can be used from the firmware.
Required steps / Implementation details
The following step are required:
Check how this is done in b-braun.
The JSON should be as similar as possible to simplify the use for our phone app developpers.
Definition of Done
- JSON format is defined
- conversion code exists and is tested
- Kconfig options exist to enable this functionality in a project
- code is reviewed
eva-cerncic commented
It would be useful to add "get default value", so we can also auto-generate function that will set default values from json structure if the new default value is different from the set one or default is not set yet.