Adjust device web api endpoint for dynamic led count
This commit is contained in:
parent
d0397c821f
commit
3b6e9343d4
@ -73,8 +73,9 @@ void WebApiDeviceClass::onDeviceAdminGet(AsyncWebServerRequest* request)
|
|||||||
displayPinObj["reset"] = pin.display_reset;
|
displayPinObj["reset"] = pin.display_reset;
|
||||||
|
|
||||||
JsonObject ledPinObj = curPin.createNestedObject("led");
|
JsonObject ledPinObj = curPin.createNestedObject("led");
|
||||||
ledPinObj["led0"] = pin.led[0];
|
for (uint8_t i = 0; i < PINMAPPING_LED_COUNT; i++) {
|
||||||
ledPinObj["led1"] = pin.led[1];
|
ledPinObj["led" + String(i)] = pin.led[i];
|
||||||
|
}
|
||||||
|
|
||||||
JsonObject display = root.createNestedObject("display");
|
JsonObject display = root.createNestedObject("display");
|
||||||
display["rotation"] = config.Display.Rotation;
|
display["rotation"] = config.Display.Rotation;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user