diff --git a/src/EMSESPDevicesService.cpp b/src/EMSESPDevicesService.cpp index 15368789a..8fccbdc32 100644 --- a/src/EMSESPDevicesService.cpp +++ b/src/EMSESPDevicesService.cpp @@ -44,7 +44,7 @@ void EMSESPDevicesService::scan_devices(AsyncWebServerRequest * request) { } void EMSESPDevicesService::all_devices(AsyncWebServerRequest * request) { - AsyncJsonResponse * response = new AsyncJsonResponse(false, MAX_EMSESP_STATUS_SIZE); + AsyncJsonResponse * response = new AsyncJsonResponse(false, MAX_EMSESP_DEVICE_SIZE); JsonObject root = response->getRoot(); JsonArray devices = root.createNestedArray("devices"); @@ -78,7 +78,7 @@ void EMSESPDevicesService::device_data(AsyncWebServerRequest * request, JsonVari if (json.is()) { uint8_t id = json["id"]; // get id from selected table row - AsyncJsonResponse * response = new AsyncJsonResponse(false, 1024); + AsyncJsonResponse * response = new AsyncJsonResponse(false, MAX_EMSESP_DEVICE_SIZE); #ifndef EMSESP_STANDALONE EMSESP::device_info(id, (JsonObject &)response->getRoot()); #endif diff --git a/src/EMSESPDevicesService.h b/src/EMSESPDevicesService.h index 05cc58577..b542e82fc 100644 --- a/src/EMSESPDevicesService.h +++ b/src/EMSESPDevicesService.h @@ -24,7 +24,8 @@ #include #include -#define MAX_EMSESP_STATUS_SIZE 1024 +// #define MAX_EMSESP_STATUS_SIZE 1024 +#define MAX_EMSESP_DEVICE_SIZE 1280 #define EMSESP_DEVICES_SERVICE_PATH "/rest/allDevices" #define SCAN_DEVICES_SERVICE_PATH "/rest/scanDevices"