Skip to content

Commit 946fae4

Browse files
committed
Use better define name to distinguish between topic and device SUBSCRIBE_RETRY_DELAY
1 parent 39b770b commit 946fae4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/AIoTC_Config.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@
144144
#define AIOT_CONFIG_MAX_RECONNECTION_RETRY_DELAY_ms (32000UL)
145145
#define AIOT_CONFIG_DEVICE_TOPIC_SUBSCRIBE_RETRY_DELAY_ms (5*1000UL)
146146
#define AIOT_CONFIG_MAX_DEVICE_TOPIC_SUBSCRIBE_RETRY_DELAY_ms (32000UL)
147-
#define AIOT_CONFIG_SUBSCRIBE_RETRY_DELAY_ms (1000UL)
148-
#define AIOT_CONFIG_SUBSCRIBE_MAX_RETRY_CNT (10UL)
147+
#define AIOT_CONFIG_THING_TOPICS_SUBSCRIBE_RETRY_DELAY_ms (1000UL)
148+
#define AIOT_CONFIG_THING_TOPICS_SUBSCRIBE_MAX_RETRY_CNT (10UL)
149149
#define AIOT_CONFIG_MAX_DEVICE_TOPIC_ATTACH_RETRY_DELAY_ms (1280000UL)
150150
#define AIOT_CONFIG_TIMEOUT_FOR_LASTVALUES_SYNC_ms (30000UL)
151151
#define AIOT_CONFIG_LASTVALUES_SYNC_MAX_RETRY_CNT (10UL)

src/ArduinoIoTCloudTCP.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -521,15 +521,15 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_SubscribeThingTopics()
521521
}
522522

523523
unsigned long const now = millis();
524-
bool const is_subscribe_retry_delay_expired = (now - _last_subscribe_request_tick) > AIOT_CONFIG_SUBSCRIBE_RETRY_DELAY_ms;
524+
bool const is_subscribe_retry_delay_expired = (now - _last_subscribe_request_tick) > AIOT_CONFIG_THING_TOPICS_SUBSCRIBE_RETRY_DELAY_ms;
525525
bool const is_first_subscribe_request = (_last_subscribe_request_cnt == 0);
526526

527527
if (!is_first_subscribe_request && !is_subscribe_retry_delay_expired)
528528
{
529529
return State::SubscribeThingTopics;
530530
}
531531

532-
if (_last_subscribe_request_cnt > AIOT_CONFIG_SUBSCRIBE_MAX_RETRY_CNT)
532+
if (_last_subscribe_request_cnt > AIOT_CONFIG_THING_TOPICS_SUBSCRIBE_MAX_RETRY_CNT)
533533
{
534534
_last_subscribe_request_cnt = 0;
535535
_last_subscribe_request_tick = 0;

0 commit comments

Comments
 (0)