Skip to content

Commit e81a21e

Browse files
aentingermattiabertorello
authored andcommitted
Changing name of constante MQTT_BUFFER_SIZE to MQTT_RECEIVE_BUFFER_SIZE in order to better signal the purpose of the constant
1 parent fc49176 commit e81a21e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ArduinoIoTCloud.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const static int thingIdSlot = 12;
1111
ArduinoIoTCloudClass::ArduinoIoTCloudClass() :
1212
_thing_id (""),
1313
_bearSslClient(NULL),
14-
_mqttClient (MQTT_BUFFER_SIZE)
14+
_mqttClient (MQTT_RECEIVE_BUFFER_SIZE)
1515
{
1616
}
1717

@@ -158,7 +158,7 @@ void ArduinoIoTCloudClass::update(int const reconnectionMaxRetries, int const re
158158
// MTTQClient connected!, poll() used to retrieve data from MQTT broker
159159
_mqttClient.loop();
160160

161-
uint8_t data[MQTT_BUFFER_SIZE];
161+
uint8_t data[MQTT_RECEIVE_BUFFER_SIZE];
162162
int const length = Thing.encode(data, sizeof(data));
163163
if (length > 0) {
164164
writeProperties(data, length);

src/ArduinoIoTCloud.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ArduinoIoTCloudClass {
2929
int begin(Client& net, String brokerAddress = "mqtts-sa.iot.arduino.cc");
3030

3131
// Class constant declaration
32-
static const int MQTT_BUFFER_SIZE = 256;
32+
static const int MQTT_RECEIVE_BUFFER_SIZE = 256;
3333
static const int MAX_RETRIES = 5;
3434
static const int RECONNECTION_TIMEOUT = 2000;
3535
const mqttConnectionOptions mqttOpt = {30, false, 1500};

0 commit comments

Comments
 (0)