Skip to content
This repository was archived by the owner on Jan 29, 2023. It is now read-only.

Commit af6b1d8

Browse files
authored
v1.5.0 to fix the blocking issue in loop()
### Release v1.5.0 1. Workaround for core WiFi.status() bug, which does not detect WiFi lost. 2. Fix the blocking issue in loop(). Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18) 3. Configurable `WIFI_RECON_INTERVAL`. Check [retries block the main loop #18](khoih-prog/WiFiManager_NINA_Lite#18 (comment)) 4. Update `Packages' Patches`
1 parent 6b0a17d commit af6b1d8

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

examples/Portenta_H7_WiFi_MQTT/defines.h

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,21 @@
8484

8585
// Permit input only one set of WiFi SSID/PWD. The other can be "NULL or "blank"
8686
// Default is false (if not defined) => must input 2 sets of SSID/PWD
87-
#define REQUIRE_ONE_SET_SSID_PW false
87+
#define REQUIRE_ONE_SET_SSID_PW true //false
8888

89-
#define USE_DYNAMIC_PARAMETERS true //false
89+
// Max times to try WiFi per loop() iteration. To avoid blocking issue in loop()
90+
// Default 1 if not defined, and minimum 1.
91+
//#define MAX_NUM_WIFI_RECON_TRIES_PER_LOOP 2
92+
93+
// Default no interval between recon WiFi if lost
94+
// Max permitted interval will be 10mins
95+
// Uncomment to use. Be careful, WiFi reconnect will be delayed if using this method
96+
// Only use whenever urgent tasks in loop() can't be delayed. But if so, it's better you have to rewrite your code, e.g. using higher priority tasks.
97+
#define WIFI_RECON_INTERVAL 30000
98+
99+
/////////////////////////////////////////////
100+
101+
#define USE_DYNAMIC_PARAMETERS true
90102

91103
/////////////////////////////////////////////
92104

0 commit comments

Comments
 (0)