Skip to content

Commit 91860fc

Browse files
committed
Config: rename AIOT_CONFIG_DEVICE_TOPIC_ to AIOT_CONFIG_THING_ID_REQUEST_
1 parent 6e646c5 commit 91860fc

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/AIoTC_Config.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,11 @@
148148

149149
#define AIOT_CONFIG_RECONNECTION_RETRY_DELAY_ms (1000UL)
150150
#define AIOT_CONFIG_MAX_RECONNECTION_RETRY_DELAY_ms (32000UL)
151-
#define AIOT_CONFIG_DEVICE_TOPIC_SUBSCRIBE_RETRY_DELAY_ms (2000UL)
152-
#define AIOT_CONFIG_MAX_DEVICE_TOPIC_SUBSCRIBE_RETRY_DELAY_ms (32000UL)
153-
#define AIOT_CONFIG_DEVICE_TOPIC_MAX_RETRY_CNT (10UL)
151+
152+
#define AIOT_CONFIG_THING_ID_REQUEST_RETRY_DELAY_ms (2000UL)
153+
#define AIOT_CONFIG_MAX_THING_ID_REQUEST_RETRY_DELAY_ms (32000UL)
154+
#define AIOT_CONFIG_THING_ID_REQUEST_MAX_RETRY_CNT (10UL)
155+
154156
#define AIOT_CONFIG_DEVICE_TOPIC_ATTACH_RETRY_DELAY_ms (20000UL)
155157
#define AIOT_CONFIG_MAX_DEVICE_TOPIC_ATTACH_RETRY_DELAY_ms (1280000UL)
156158
#define AIOT_CONFIG_TIMEOUT_FOR_LASTVALUES_SYNC_ms (30000UL)

src/ArduinoIoTCloudDevice.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ _registered(false) {
3333
}
3434

3535
void ArduinoCloudDevice::begin() {
36-
_attachAttempt.begin(AIOT_CONFIG_DEVICE_TOPIC_SUBSCRIBE_RETRY_DELAY_ms,
37-
AIOT_CONFIG_MAX_DEVICE_TOPIC_SUBSCRIBE_RETRY_DELAY_ms);
36+
_attachAttempt.begin(AIOT_CONFIG_THING_ID_REQUEST_RETRY_DELAY_ms,
37+
AIOT_CONFIG_MAX_THING_ID_REQUEST_RETRY_DELAY_ms);
3838
}
3939

4040
void ArduinoCloudDevice::update() {
@@ -93,8 +93,8 @@ void ArduinoCloudDevice::handleMessage(Message *m) {
9393

9494
ArduinoCloudDevice::State ArduinoCloudDevice::handleInit() {
9595
/* Reset attempt struct for the nex retry after disconnection */
96-
_attachAttempt.begin(AIOT_CONFIG_DEVICE_TOPIC_SUBSCRIBE_RETRY_DELAY_ms,
97-
AIOT_CONFIG_MAX_DEVICE_TOPIC_SUBSCRIBE_RETRY_DELAY_ms);
96+
_attachAttempt.begin(AIOT_CONFIG_THING_ID_REQUEST_RETRY_DELAY_ms,
97+
AIOT_CONFIG_MAX_THING_ID_REQUEST_RETRY_DELAY_ms);
9898

9999
_attached = false;
100100
_registered = false;
@@ -120,7 +120,7 @@ ArduinoCloudDevice::State ArduinoCloudDevice::handleSendCapabilities() {
120120

121121
ArduinoCloudDevice::State ArduinoCloudDevice::handleConnected() {
122122
/* Max retry than disconnect */
123-
if (_attachAttempt.getRetryCount() > AIOT_CONFIG_DEVICE_TOPIC_MAX_RETRY_CNT) {
123+
if (_attachAttempt.getRetryCount() > AIOT_CONFIG_THING_ID_REQUEST_MAX_RETRY_CNT) {
124124
return State::Disconnected;
125125
}
126126

0 commit comments

Comments
 (0)