Fix: Calculate the json buffer for the inverter list based on INV_MAX_COUNT
This commit is contained in:
parent
6429d64062
commit
e2594ac843
@ -34,7 +34,7 @@ void WebApiInverterClass::onInverterList(AsyncWebServerRequest* request)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AsyncJsonResponse* response = new AsyncJsonResponse(false, 4096U);
|
AsyncJsonResponse* response = new AsyncJsonResponse(false, 768 * INV_MAX_COUNT);
|
||||||
JsonObject root = response->getRoot();
|
JsonObject root = response->getRoot();
|
||||||
JsonArray data = root.createNestedArray("inverter");
|
JsonArray data = root.createNestedArray("inverter");
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user