mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
fix copy/paste error
This commit is contained in:
@@ -201,11 +201,11 @@ void WebCustomizationService::devices(AsyncWebServerRequest * request) {
|
|||||||
void WebCustomizationService::device_entities(AsyncWebServerRequest * request, JsonVariant & json) {
|
void WebCustomizationService::device_entities(AsyncWebServerRequest * request, JsonVariant & json) {
|
||||||
if (json.is<JsonObject>()) {
|
if (json.is<JsonObject>()) {
|
||||||
size_t buffer = EMSESP_JSON_SIZE_XXXLARGE_DYN;
|
size_t buffer = EMSESP_JSON_SIZE_XXXLARGE_DYN;
|
||||||
auto * response = new PrettyAsyncJsonResponse(true, buffer);
|
auto * response = new MsgpackAsyncJsonResponse(true, buffer);
|
||||||
while (!response->getSize()) {
|
while (!response->getSize()) {
|
||||||
delete response;
|
delete response;
|
||||||
buffer -= 1024;
|
buffer -= 1024;
|
||||||
response = new PrettyAsyncJsonResponse(true, buffer);
|
response = new MsgpackAsyncJsonResponse(true, buffer);
|
||||||
}
|
}
|
||||||
for (const auto & emsdevice : EMSESP::emsdevices) {
|
for (const auto & emsdevice : EMSESP::emsdevices) {
|
||||||
if (emsdevice->unique_id() == json["id"]) {
|
if (emsdevice->unique_id() == json["id"]) {
|
||||||
|
|||||||
@@ -166,11 +166,11 @@ void WebDataService::sensor_data(AsyncWebServerRequest * request) {
|
|||||||
void WebDataService::device_data(AsyncWebServerRequest * request, JsonVariant & json) {
|
void WebDataService::device_data(AsyncWebServerRequest * request, JsonVariant & json) {
|
||||||
if (json.is<JsonObject>()) {
|
if (json.is<JsonObject>()) {
|
||||||
size_t buffer = EMSESP_JSON_SIZE_XXXLARGE_DYN;
|
size_t buffer = EMSESP_JSON_SIZE_XXXLARGE_DYN;
|
||||||
auto * response = new PrettyAsyncJsonResponse(false, buffer);
|
auto * response = new MsgpackAsyncJsonResponse(false, buffer);
|
||||||
while (!response->getSize()) {
|
while (!response->getSize()) {
|
||||||
delete response;
|
delete response;
|
||||||
buffer -= 1024;
|
buffer -= 1024;
|
||||||
response = new PrettyAsyncJsonResponse(false, buffer);
|
response = new MsgpackAsyncJsonResponse(false, buffer);
|
||||||
}
|
}
|
||||||
for (const auto & emsdevice : EMSESP::emsdevices) {
|
for (const auto & emsdevice : EMSESP::emsdevices) {
|
||||||
if (emsdevice->unique_id() == json["id"]) {
|
if (emsdevice->unique_id() == json["id"]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user