Reduce input buffer so hex/json encoded content always fits

This commit is contained in:
Matthijs Abma 2020-05-24 17:23:26 +02:00
parent 7210934774
commit 721c2c8f7f
1 changed files with 2 additions and 2 deletions

View File

@ -124,12 +124,12 @@ const uint16_t SYSLOG_TIMER = 600; // Seconds to restore syslog_level
const uint16_t SERIALLOG_TIMER = 600; // Seconds to disable SerialLog
const uint8_t OTA_ATTEMPTS = 5; // Number of times to try fetching the new firmware
const uint16_t INPUT_BUFFER_SIZE = 520; // Max number of characters in serial command buffer
const uint16_t INPUT_BUFFER_SIZE = 510; // Max number of characters in serial command buffer: floor((MIN_MESSZ - len({"SerialReceived":""})) / 2) + 1
const uint16_t FLOATSZ = 16; // Max number of characters in float result from dtostrfd (max 32)
const uint16_t CMDSZ = 24; // Max number of characters in command
const uint16_t TOPSZ = 151; // Max number of characters in topic string
const uint16_t LOGSZ = 700; // Max number of characters in log
const uint16_t MIN_MESSZ = 1040; // Min number of characters in MQTT message (1000 - TOPSZ - 9 header bytes)
const uint16_t MIN_MESSZ = 1040; // Min number of characters in MQTT message (1200 - TOPSZ - 9 header bytes)
const uint8_t SENSOR_MAX_MISS = 5; // Max number of missed sensor reads before deciding it's offline