From 74a02fdc8181590e93caebd4d1aeb56db6ea4e37 Mon Sep 17 00:00:00 2001 From: Florian <1technophile@users.noreply.github.com> Date: Sat, 1 Dec 2018 11:56:32 +0100 Subject: [PATCH] move MQTT_MAX_PACKET_SIZE to pubsubclient library --- lib/pubsubclient/src/PubSubClient.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/pubsubclient/src/PubSubClient.h b/lib/pubsubclient/src/PubSubClient.h index 2d1b1f6f..92e2d2b2 100644 --- a/lib/pubsubclient/src/PubSubClient.h +++ b/lib/pubsubclient/src/PubSubClient.h @@ -23,7 +23,11 @@ // MQTT_MAX_PACKET_SIZE : Maximum packet size #ifndef MQTT_MAX_PACKET_SIZE -#define MQTT_MAX_PACKET_SIZE 512 + #if defined(ESP8266) || defined(ESP32) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__) + #define MQTT_MAX_PACKET_SIZE 1024 + #else // boards with smaller memory + #define MQTT_MAX_PACKET_SIZE 256 + #endif #endif // MQTT_KEEPALIVE : keepAlive interval in Seconds