mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
web mqtt size fix - #298
This commit is contained in:
@@ -1905,15 +1905,16 @@ bool MyESP::_fs_loadConfig() {
|
|||||||
_mqtt_keepalive = mqtt["keepalive"] | MQTT_KEEPALIVE;
|
_mqtt_keepalive = mqtt["keepalive"] | MQTT_KEEPALIVE;
|
||||||
_mqtt_retain = mqtt["retain"];
|
_mqtt_retain = mqtt["retain"];
|
||||||
_mqtt_qos = mqtt["qos"] | MQTT_QOS;
|
_mqtt_qos = mqtt["qos"] | MQTT_QOS;
|
||||||
_mqtt_nestedjson = mqtt["nestedjson"]; // default to on
|
_mqtt_nestedjson = mqtt["nestedjson"] | true; // default to on
|
||||||
_mqtt_password = strdup(mqtt["password"] | "");
|
_mqtt_password = strdup(mqtt["password"] | "");
|
||||||
_mqtt_base = strdup(mqtt["base"] | MQTT_BASE_DEFAULT);
|
_mqtt_base = strdup(mqtt["base"] | MQTT_BASE_DEFAULT);
|
||||||
|
|
||||||
JsonObject ntp = doc["ntp"];
|
JsonObject ntp = doc["ntp"];
|
||||||
_ntp_server = strdup(ntp["server"] | "");
|
_ntp_server = strdup(ntp["server"] | "");
|
||||||
_ntp_interval = ntp["interval"] | 60;
|
_ntp_interval = ntp["interval"] | 60;
|
||||||
if (_ntp_interval < 2)
|
if (_ntp_interval < 2) {
|
||||||
_ntp_interval = NTP_INTERVAL_DEFAULT;
|
_ntp_interval = NTP_INTERVAL_DEFAULT;
|
||||||
|
}
|
||||||
_ntp_enabled = ntp["enabled"];
|
_ntp_enabled = ntp["enabled"];
|
||||||
_ntp_timezone = ntp["timezone"] | NTP_TIMEZONE_DEFAULT;
|
_ntp_timezone = ntp["timezone"] | NTP_TIMEZONE_DEFAULT;
|
||||||
|
|
||||||
@@ -2575,7 +2576,7 @@ bool MyESP::_fs_sendConfig() {
|
|||||||
|
|
||||||
// send custom status via ws
|
// send custom status via ws
|
||||||
void MyESP::_sendCustomStatus() {
|
void MyESP::_sendCustomStatus() {
|
||||||
DynamicJsonDocument doc(MYESP_JSON_MAXSIZE_MEDIUM);
|
DynamicJsonDocument doc(MYESP_JSON_MAXSIZE_LARGE);
|
||||||
|
|
||||||
JsonObject root = doc.to<JsonObject>();
|
JsonObject root = doc.to<JsonObject>();
|
||||||
|
|
||||||
@@ -2591,7 +2592,7 @@ void MyESP::_sendCustomStatus() {
|
|||||||
(_web_callback_f)(root);
|
(_web_callback_f)(root);
|
||||||
}
|
}
|
||||||
|
|
||||||
char buffer[MYESP_JSON_MAXSIZE_MEDIUM];
|
char buffer[MYESP_JSON_MAXSIZE_LARGE];
|
||||||
size_t len = serializeJson(root, buffer);
|
size_t len = serializeJson(root, buffer);
|
||||||
|
|
||||||
#ifdef MYESP_DEBUG
|
#ifdef MYESP_DEBUG
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#ifndef MyESP_h
|
#ifndef MyESP_h
|
||||||
#define MyESP_h
|
#define MyESP_h
|
||||||
|
|
||||||
#define MYESP_VERSION "1.2.29"
|
#define MYESP_VERSION "1.2.30"
|
||||||
|
|
||||||
#include <ArduinoJson.h>
|
#include <ArduinoJson.h>
|
||||||
#include <ArduinoOTA.h>
|
#include <ArduinoOTA.h>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#define APP_VERSION "1.9.5b41"
|
#define APP_VERSION "1.9.5b42"
|
||||||
|
|||||||
Reference in New Issue
Block a user