1
0
mirror of https://github.com/s00500/ESPUI.git synced 2025-11-28 04:13:16 +00:00

Changes to support ArduinoJson 6 & 7

This commit is contained in:
MartinMueller2003
2024-03-26 16:06:23 -04:00
parent 7dc51d1274
commit 75bd3dc378
6 changed files with 38 additions and 19 deletions

View File

@@ -927,7 +927,7 @@ void ESPUIClass::clearGraph(uint16_t id, int clientId)
break;
}
DynamicJsonDocument document(jsonUpdateDocumentSize);
AllocateJsonDocument(document, jsonUpdateDocumentSize);
JsonObject root = document.to<JsonObject>();
root[F("type")] = (int)ControlType::Graph + UpdateOffset;
@@ -949,7 +949,7 @@ void ESPUIClass::addGraphPoint(uint16_t id, int nValue, int clientId)
break;
}
DynamicJsonDocument document(jsonUpdateDocumentSize);
AllocateJsonDocument(document, jsonUpdateDocumentSize);
JsonObject root = document.to<JsonObject>();
root[F("type")] = (int)ControlType::GraphPoint;
@@ -961,7 +961,7 @@ void ESPUIClass::addGraphPoint(uint16_t id, int nValue, int clientId)
} while (false);
}
bool ESPUIClass::SendJsonDocToWebSocket(ArduinoJson::DynamicJsonDocument& document, uint16_t clientId)
bool ESPUIClass::SendJsonDocToWebSocket(ArduinoJson::JsonDocument& document, uint16_t clientId)
{
bool Response = false;