mirror of
https://github.com/btclock/btclock_v3.git
synced 2024-11-19 06:10:00 +01:00
Hotfix for individual LED addressing
This commit is contained in:
parent
1ad97b9b71
commit
b195368150
@ -713,8 +713,6 @@ void onApiLightsSetColor(AsyncWebServerRequest *request)
|
|||||||
|
|
||||||
void onApiLightsSetJson(AsyncWebServerRequest *request, JsonVariant &json)
|
void onApiLightsSetJson(AsyncWebServerRequest *request, JsonVariant &json)
|
||||||
{
|
{
|
||||||
if (request->method() == HTTP_PATCH) {
|
|
||||||
|
|
||||||
JsonArray lights = json.as<JsonArray>();
|
JsonArray lights = json.as<JsonArray>();
|
||||||
|
|
||||||
if (lights.size() != pixels.numPixels())
|
if (lights.size() != pixels.numPixels())
|
||||||
@ -761,9 +759,6 @@ void onApiLightsSetJson(AsyncWebServerRequest *request, JsonVariant &json)
|
|||||||
saveLedState();
|
saveLedState();
|
||||||
|
|
||||||
request->send(200);
|
request->send(200);
|
||||||
} else {
|
|
||||||
request->send(404);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void onIndex(AsyncWebServerRequest *request) { request->send(LittleFS, "/index.html", String(), false); }
|
void onIndex(AsyncWebServerRequest *request) { request->send(LittleFS, "/index.html", String(), false); }
|
||||||
|
Loading…
Reference in New Issue
Block a user