Skip to content

Commit b13a560

Browse files
committed
Replace magic RP2040 OTA timeout values with sensibly named constants.
1 parent 756a64a commit b13a560

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utility/ota/OTA-nano-rp2040.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ int rp2040_connect_onOTARequest(char const * ota_url)
133133
is_http_header_timeout = false;
134134
for (unsigned long const start = millis(); !is_header_complete;)
135135
{
136-
is_http_header_timeout = (millis() - start) > (10*1000);
136+
is_http_header_timeout = (millis() - start) > AIOT_CONFIG_RP2040_OTA_HTTP_HEADER_RECEIVE_TIMEOUT_ms;
137137
if (is_http_header_timeout) break;
138138

139139
mbed_watchdog_reset();
@@ -178,7 +178,7 @@ int rp2040_connect_onOTARequest(char const * ota_url)
178178
bool is_http_data_timeout = false;
179179
for(unsigned long const start = millis(); bytes_received < content_length_val;)
180180
{
181-
is_http_data_timeout = (millis() - start) > (60*1000);
181+
is_http_data_timeout = (millis() - start) > AIOT_CONFIG_RP2040_OTA_HTTP_DATA_RECEIVE_TIMEOUT_ms;
182182
if (is_http_data_timeout) break;
183183

184184
mbed_watchdog_reset();

0 commit comments

Comments
 (0)