Skip to content

Commit f3c1f17

Browse files
committed
Prefixing constants with AIOTC_CONFIG_ in order to avoid overriding similiar named defines in other (user) libraries.
1 parent a5a91e3 commit f3c1f17

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/AIoTC_Config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
* CONSTANTS
139139
******************************************************************************/
140140

141-
#define RECONNECTION_RETRY_DELAY_ms (1000UL)
142-
#define MAX_RECONNECTION_RETRY_DELAY_ms (32000UL)
141+
#define AIOT_CONFIG_RECONNECTION_RETRY_DELAY_ms (1000UL)
142+
#define AIOT_CONFIG_MAX_RECONNECTION_RETRY_DELAY_ms (32000UL)
143143

144144
#endif /* ARDUINO_AIOTC_CONFIG_H_ */

src/ArduinoIoTCloudTCP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_ConnectMqttBroker()
364364
}
365365

366366
_last_connection_attempt_cnt++;
367-
unsigned long const reconnection_retry_delay = min(MAX_RECONNECTION_RETRY_DELAY_ms, pow(2, _last_connection_attempt_cnt) * RECONNECTION_RETRY_DELAY_ms);
367+
unsigned long const reconnection_retry_delay = min(AIOT_CONFIG_MAX_RECONNECTION_RETRY_DELAY_ms, pow(2, _last_connection_attempt_cnt) * AIOT_CONFIG_RECONNECTION_RETRY_DELAY_ms);
368368
_next_connection_attempt_tick = millis() + reconnection_retry_delay;
369369

370370
DEBUG_ERROR("ArduinoIoTCloudTCP::%s could not connect to %s:%d", __FUNCTION__, _brokerAddress.c_str(), _brokerPort);

0 commit comments

Comments
 (0)