Adding User-Selectable Options

Do I have this right? If I want to add an option to the HTML settings page, do I just have to create a matching bit of processing code in set.cpp?

in html_settings.h…
New Option: type="checkbox" name="NO"><br>

in set.cpp…
NewOptionEnabled = request->hasArg("NO");

I am looking forward to built-in usermod UI support as part of the usermod subsystem.
Then we would not need to worry about this, or at least we would have documentation on what to worry about :slight_smile:

1 Like

html_settings.h / data/settings*.htm: HTML form for option
set.cpp: link HTTP API request to variable
wled_eeprom.cpp: persistence of variable (save/load)
xml.cpp: optional status for variable/option
wled.h: variable declaration

1 Like