We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf6307c commit 28f4f54Copy full SHA for 28f4f54
src/network_interfaces/ws_networking_pico.h
@@ -268,13 +268,15 @@ class ws_networking_pico : public Wippersnapper {
268
WiFi.setTimeout(20000);
269
WS.feedWDT();
270
WiFi.begin(_ssid, _pass);
271
- // Here, we're going to wait 20 seconds total, matching the value within
272
- // setTimeout().
273
- // However, due to the global WDT of 6 sec., we need to feed the WDT
274
- // after every 5 seconds.
+ // Wait setTimeout duration for a connection and check if connected every
+ // 5 seconds
275
for (int i = 0; i < 4; i++) {
276
delay(5000);
277
+ if (WiFi.status() == WL_CONNECTED) {
+ _status = WS_NET_CONNECTED;
278
+ return;
279
+ }
280
}
281
_status = WS_NET_DISCONNECTED;
282
0 commit comments