Skip to content

Commit 2ff55a2

Browse files
authored
Merge pull request #4 from cmmakerclub/master
Add #ifdefine to override default PubSubClient value.
2 parents 1dad225 + b3ced1a commit 2ff55a2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

PubSubClient.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,19 @@
2121
#define MQTT_VERSION MQTT_VERSION_3_1_1
2222

2323
// MQTT_MAX_PACKET_SIZE : Maximum packet size
24+
#ifndef MQTT_MAX_PACKET_SIZE
2425
#define MQTT_MAX_PACKET_SIZE 1024
26+
#endif
2527

2628
// MQTT_KEEPALIVE : keepAlive interval in Seconds
29+
#ifndef MQTT_KEEPALIVE
2730
#define MQTT_KEEPALIVE 15
31+
#endif
2832

2933
// MQTT_SOCKET_TIMEOUT: socket timeout interval in Seconds
34+
#ifndef MQTT_SOCKET_TIMEOUT
3035
#define MQTT_SOCKET_TIMEOUT 15
36+
#endif
3137

3238
// MQTT_MAX_TRANSFER_SIZE : limit how much data is passed to the network client
3339
// in each write call. Needed for the Arduino Wifi Shield. Leave undefined to

0 commit comments

Comments
 (0)