Skip to content

Commit 4f79f7b

Browse files
committed
AirLift: define magic numbers for retry timings
1 parent 5bbbe40 commit 4f79f7b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/network_interfaces/Wippersnapper_AIRLIFT.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929

3030
#define NINAFWVER \
3131
"1.7.7" /*!< min. nina-fw version compatible with this library. */
32+
#define AIRLIFT_CONNECT_TIMEOUT_MS 20000 /*!< Connection timeout (in ms) */
33+
#define AIRLIFT_CONNECT_RETRY_DELAY_MS 200 /*!< delay time between retries. */
3234

3335
#define SPIWIFI SPI /*!< Instance of SPI interface used by an AirLift. */
3436

@@ -339,8 +341,8 @@ class Wippersnapper_AIRLIFT : public Wippersnapper {
339341
int, // return type
340342
lastResult, // return variable
341343
[](int status) { return status == WL_CONNECTED; }, // check
342-
20000, // timeout interval (ms)
343-
200); // interval between retries
344+
AIRLIFT_CONNECT_TIMEOUT_MS, // timeout interval (ms)
345+
AIRLIFT_CONNECT_RETRY_DELAY_MS); // interval between retries
344346

345347
if (lastResult == WL_CONNECTED) {
346348
_status = WS_NET_CONNECTED;

0 commit comments

Comments
 (0)