added slider for led brightness

This commit is contained in:
RaffaelW 2024-12-15 00:11:37 +01:00
parent 6276b1f74b
commit 4234732631
5 changed files with 65 additions and 7 deletions

View file

@ -96,6 +96,7 @@ void onGetConfig(AsyncWebServerRequest *request)
doc["direction-1"] = config.getUInt("direction-1", Output);
doc["universe-2"] = config.getUInt("universe-2", 1);
doc["direction-2"] = config.getUInt("direction-2", Input);
doc["led-brightness"] = config.getUInt("led-brightness", 25);
config.end();
@ -152,6 +153,8 @@ void onPutConfig(AsyncWebServerRequest *request, uint8_t *data, size_t len, size
config.putUInt("universe-1", doc["universe-1"]);
config.putUInt("universe-2", doc["universe-2"]);
config.putUInt("led-brightness", doc["led-brightness"]);
config.end();
request->send(200);