mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 02:52:11 +01:00
Increase JSON buffer size #249
This commit is contained in:
parent
54f98805b4
commit
1edd5d9b87
4 changed files with 4 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -4,3 +4,4 @@ esp32.vsd
|
|||
esp32s3.svd
|
||||
debug.cfg
|
||||
|
||||
SomfyController.ino.XIAO_ESP32S3.bin
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
6
Web.cpp
6
Web.cpp
|
|
@ -22,7 +22,7 @@ extern MQTTClass mqtt;
|
|||
extern GitUpdater git;
|
||||
extern Network net;
|
||||
|
||||
#define WEB_MAX_RESPONSE 16384
|
||||
#define WEB_MAX_RESPONSE 32768
|
||||
static char g_content[WEB_MAX_RESPONSE];
|
||||
|
||||
|
||||
|
|
@ -231,7 +231,7 @@ void Web::handleController(WebServer &server) {
|
|||
HTTPMethod method = server.method();
|
||||
settings.printAvailHeap();
|
||||
if (method == HTTP_POST || method == HTTP_GET) {
|
||||
DynamicJsonDocument doc(16384);
|
||||
DynamicJsonDocument doc(WEB_MAX_RESPONSE);
|
||||
somfy.toJSON(doc);
|
||||
serializeJson(doc, g_content);
|
||||
server.send(200, _encoding_json, g_content);
|
||||
|
|
@ -713,7 +713,7 @@ void Web::handleDiscovery(WebServer &server) {
|
|||
HTTPMethod method = apiServer.method();
|
||||
if (method == HTTP_POST || method == HTTP_GET) {
|
||||
Serial.println("Discovery Requested");
|
||||
DynamicJsonDocument doc(16384);
|
||||
DynamicJsonDocument doc(WEB_MAX_RESPONSE);
|
||||
JsonObject obj = doc.to<JsonObject>();
|
||||
obj["serverId"] = settings.serverId;
|
||||
obj["version"] = settings.fwVersion.name;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue