File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 156156 #define HAS_TCP
157157#endif
158158
159+ #ifdef HAS_TCP
160+ #ifndef MQTT_TX_BUFFER_SIZE
161+ #define MQTT_TX_BUFFER_SIZE 256
162+ #endif // MQTT_TX_BUFFER_SIZE
163+
164+ #ifndef STRING_PROPERTY_MAX_SIZE
165+ // 6 represents the expected overhead of a string property inside a cbor
166+ #define STRING_PROPERTY_MAX_SIZE MQTT_TX_BUFFER_SIZE - 6
167+ #endif // STRING_PROPERTY_MAX_SIZE
168+ #else
169+ #ifndef STRING_PROPERTY_MAX_SIZE
170+ #define STRING_PROPERTY_MAX_SIZE 50
171+ #endif // STRING_PROPERTY_MAX_SIZE
172+ #endif // HAS_TCP
173+
159174/******************************************************************************
160175 * CONSTANTS
161176 ******************************************************************************/
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
106106#endif
107107
108108 private:
109- static const int MQTT_TRANSMIT_BUFFER_SIZE = 256 ;
109+ static const int MQTT_TRANSMIT_BUFFER_SIZE = MQTT_TX_BUFFER_SIZE ;
110110
111111 enum class State
112112 {
You can’t perform that action at this time.
0 commit comments