Skip to content

Commit 52fcdc5

Browse files
committed
Move/rename TIMEOUT_FOR_LASTVALUES_SYNC to AIOTC_Config as AIOT_CONFIG_TIMEOUT_FOR_LASTVALUES_SYNC_ms.
1 parent 6212f0d commit 52fcdc5

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/AIoTC_Config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,5 +140,6 @@
140140

141141
#define AIOT_CONFIG_RECONNECTION_RETRY_DELAY_ms (1000UL)
142142
#define AIOT_CONFIG_MAX_RECONNECTION_RETRY_DELAY_ms (32000UL)
143+
#define AIOT_CONFIG_TIMEOUT_FOR_LASTVALUES_SYNC_ms (10000UL)
143144

144145
#endif /* ARDUINO_AIOTC_CONFIG_H_ */

src/ArduinoIoTCloudTCP.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@
5353
extern RTC_HandleTypeDef RTCHandle;
5454
#endif
5555

56-
/******************************************************************************
57-
GLOBAL CONSTANTS
58-
******************************************************************************/
59-
60-
static const int TIMEOUT_FOR_LASTVALUES_SYNC = 10000;
61-
6256
/******************************************************************************
6357
LOCAL MODULE FUNCTIONS
6458
******************************************************************************/
@@ -423,7 +417,7 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_RequestLastValues()
423417

424418
/* Check whether or not we need to send a new request. */
425419
unsigned long const now = millis();
426-
if ((now - _lastSyncRequestTickTime) > TIMEOUT_FOR_LASTVALUES_SYNC)
420+
if ((now - _lastSyncRequestTickTime) > AIOT_CONFIG_TIMEOUT_FOR_LASTVALUES_SYNC_ms)
427421
{
428422
DEBUG_VERBOSE("ArduinoIoTCloudTCP::%s [%d] last values requested", __FUNCTION__, now);
429423
requestLastValue();

0 commit comments

Comments
 (0)