Fix: Calculate the json buffer for the inverter list based on INV_MAX_COUNT

This commit is contained in:
Thomas Basler 2023-08-22 17:05:46 +02:00
parent 6429d64062
commit e2594ac843

View File

@ -34,7 +34,7 @@ void WebApiInverterClass::onInverterList(AsyncWebServerRequest* request)
return;
}
AsyncJsonResponse* response = new AsyncJsonResponse(false, 4096U);
AsyncJsonResponse* response = new AsyncJsonResponse(false, 768 * INV_MAX_COUNT);
JsonObject root = response->getRoot();
JsonArray data = root.createNestedArray("inverter");