From 0964a1a9dd7244eb35abbf04b51cd947f315d81b Mon Sep 17 00:00:00 2001 From: Adrian <35405447+ascillato@users.noreply.github.com> Date: Tue, 13 Mar 2018 04:42:57 -0300 Subject: [PATCH] Update xdrv_00_mqtt.ino --- sonoff/xdrv_00_mqtt.ino | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sonoff/xdrv_00_mqtt.ino b/sonoff/xdrv_00_mqtt.ino index dd46b8c07..9f89eb259 100644 --- a/sonoff/xdrv_00_mqtt.ino +++ b/sonoff/xdrv_00_mqtt.ino @@ -68,10 +68,8 @@ bool mqtt_connected = false; // MQTT virtual connection status #include // Max message size calculated by PubSubClient is (MQTT_MAX_PACKET_SIZE < 5 + 2 + strlen(topic) + plength) -#if (MQTT_MAX_PACKET_SIZE -TOPSZ -7) < MIN_MESSZ // If the max message size is too small, throw a warning at compile time. See PubSubClient.cpp line 359 - #warning "MQTT_MAX_PACKET_SIZE is too small in libraries/PubSubClient/src/PubSubClient.h, increasing it to 1000" - #undef MQTT_MAX_PACKET_SIZE - #define MQTT_MAX_PACKET_SIZE 1000 +#if (MQTT_MAX_PACKET_SIZE -TOPSZ -7) < MIN_MESSZ // If the max message size is too small, throw an error at compile time. See PubSubClient.cpp line 359 + #error "MQTT_MAX_PACKET_SIZE is too small in libraries/PubSubClient/src/PubSubClient.h, increase it to at least 1000" #endif PubSubClient MqttClient(EspClient);