minor changes

This commit is contained in:
proddy
2020-08-04 20:42:31 +02:00
parent b0a490f781
commit 2f7ad14b38
2 changed files with 4 additions and 4 deletions

View File

@@ -103,7 +103,7 @@ void Mixing::show_values(uuid::console::Shell & shell) {
// publish values via MQTT
// ideally we should group up all the mixing units together into a nested JSON but for now we'll send them individually
void Mixing::publish_values() {
DynamicJsonDocument doc(EMSESP_MAX_JSON_SIZE_SMALL);
StaticJsonDocument<EMSESP_MAX_JSON_SIZE_SMALL> doc;
switch (type_) {
case Type::HC:

View File

@@ -37,9 +37,9 @@
using uuid::console::Shell;
#define EMSESP_MAX_JSON_SIZE_SMALL 200 // for smaller json docs
#define EMSESP_MAX_JSON_SIZE_MEDIUM 800 // for smaller json docs from ems devices
#define EMSESP_MAX_JSON_SIZE_LARGE 1500 // for large json docs from ems devices, like boiler or thermostat data
#define EMSESP_MAX_JSON_SIZE_SMALL 200 // for smaller json docs when using StaticJsonDocument
#define EMSESP_MAX_JSON_SIZE_MEDIUM 800 // for smaller json docs from ems devices, when using StaticJsonDocument
#define EMSESP_MAX_JSON_SIZE_LARGE 1500 // for large json docs from ems devices, like boiler or thermostat data. Using DynamicJsonDocument
namespace emsesp {