minor fix for default mqtt_nestedjson cmd

This commit is contained in:
Paul
2020-02-22 11:48:13 +01:00
parent 9eda49b46a
commit 6c39154e90
2 changed files with 2 additions and 2 deletions

View File

@@ -1880,7 +1880,7 @@ bool MyESP::_fs_loadConfig() {
_mqtt_keepalive = mqtt["keepalive"] | MQTT_KEEPALIVE;
_mqtt_retain = mqtt["retain"];
_mqtt_qos = mqtt["qos"] | MQTT_QOS;
_mqtt_nestedjson = mqtt["nestedjson"] | true; // default to on
_mqtt_nestedjson = mqtt["nestedjson"]; // default to on
_mqtt_password = strdup(mqtt["password"] | "");
_mqtt_base = strdup(mqtt["base"] | MQTT_BASE_DEFAULT);

View File

@@ -867,7 +867,6 @@ void publishEMSValues_mixing() {
// For SM10 and SM100/SM200 Solar Modules
void publishEMSValues_solar() {
char s[20] = {0}; // for formatting strings
StaticJsonDocument<MQTT_MAX_PAYLOAD_SIZE> doc;
char data[MQTT_MAX_PAYLOAD_SIZE] = {0};
JsonObject rootSM = doc.to<JsonObject>();
@@ -882,6 +881,7 @@ void publishEMSValues_solar() {
rootSM[SM_PUMPMODULATION] = EMS_SolarModule.pumpModulation;
if (EMS_SolarModule.pump != EMS_VALUE_BOOL_NOTSET) {
char s[20] = {0}; // for formatting strings
rootSM[SM_PUMP] = _bool_to_char(s, EMS_SolarModule.pump);
}