Skip to content

Commit dc86337

Browse files
committed
Use better define name to distinguish between topic and device SUBSCRIBE_RETRY_DELAY
1 parent 98ed735 commit dc86337

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
@@ -528,15 +528,15 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_SubscribeThingTopics()
528528
}
529529

530530
unsigned long const now = millis();
531-
bool const is_subscribe_retry_delay_expired = (now - _last_subscribe_request_tick) > AIOT_CONFIG_SUBSCRIBE_RETRY_DELAY_ms;
531+
bool const is_subscribe_retry_delay_expired = (now - _last_subscribe_request_tick) > AIOT_CONFIG_THING_TOPICS_SUBSCRIBE_RETRY_DELAY_ms;
532532
bool const is_first_subscribe_request = (_last_subscribe_request_cnt == 0);
533533

534534
if (!is_first_subscribe_request && !is_subscribe_retry_delay_expired)
535535
{
536536
return State::SubscribeThingTopics;
537537
}
538538

539-
if (_last_subscribe_request_cnt > AIOT_CONFIG_SUBSCRIBE_MAX_RETRY_CNT)
539+
if (_last_subscribe_request_cnt > AIOT_CONFIG_THING_TOPICS_SUBSCRIBE_MAX_RETRY_CNT)
540540
{
541541
_last_subscribe_request_cnt = 0;
542542
_last_subscribe_request_tick = 0;

0 commit comments

Comments
 (0)