@@ -406,13 +406,17 @@ const int wifiStartNamesEntries = sizeof(wifiStartNames) / sizeof(wifiStartNames
406
406
| WIFI_STA_SELECT_REMOTE_AP \
407
407
| WIFI_STA_NO_REMOTE_AP)
408
408
409
+ #define WIFI_MAX_TIMEOUT (15 * 60 * 1000 ) // Timeout in milliseconds
410
+ #define WIFI_MIN_TIMEOUT (15 * 1000 ) // Timeout in milliseconds
411
+
409
412
const char * wifiSoftApSsid = " RTK Config" ;
410
413
const char * wifiSoftApPassword = nullptr ;
411
414
412
415
// ****************************************
413
416
// Globals
414
417
// ****************************************
415
418
419
+ bool restartWiFi = false ; // Restart WiFi if user changes anything
416
420
bool wifiRestartRequested = false ; // Restart WiFi if user changes anything
417
421
418
422
// ****************************************
@@ -422,6 +426,21 @@ bool wifiRestartRequested = false; // Restart WiFi if user changes anything
422
426
// DNS server for Captive Portal
423
427
static DNSServer dnsServer;
424
428
429
+ // Start timeout
430
+ static uint32_t wifiStartTimeout;
431
+ static uint32_t wifiStartLastTry; // The last time WiFi start was attempted
432
+
433
+ // WiFi Timer usage:
434
+ // * Measure interval to display IP address
435
+ static unsigned long wifiDisplayTimer;
436
+
437
+ // WiFi interface status
438
+ static bool wifiApRunning;
439
+ static bool wifiStationRunning;
440
+
441
+ static int wifiFailedConnectionAttempts = 0 ; // Count the number of connection attempts between restarts
442
+ static WiFiMulti *wifiMulti;
443
+
425
444
// *********************************************************************
426
445
// Callback for all WiFi RX Packets
427
446
// Get RSSI of all incoming management packets: https://esp32.com/viewtopic.php?t=13889
@@ -2558,38 +2577,6 @@ void RTK_WIFI::verifyTables()
2558
2577
WL_SCAN_COMPLETED: assigned when the scan networks is completed
2559
2578
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
2560
2579
2561
- // ----------------------------------------
2562
- // Globals
2563
- // ----------------------------------------
2564
-
2565
- int wifiFailedConnectionAttempts = 0 ; // Count the number of connection attempts between restarts
2566
-
2567
- bool restartWiFi = false ; // Restart WiFi if user changes anything
2568
-
2569
- WiFiMulti *wifiMulti;
2570
-
2571
- // ----------------------------------------
2572
- // Constants
2573
- // ----------------------------------------
2574
-
2575
- #define WIFI_MAX_TIMEOUT (15 * 60 * 1000 )
2576
- #define WIFI_MIN_TIMEOUT (15 * 1000 )
2577
-
2578
- // ----------------------------------------
2579
- // Locals
2580
- // ----------------------------------------
2581
-
2582
- // Start timeout
2583
- static uint32_t wifiStartTimeout;
2584
- static uint32_t wifiStartLastTry; // The last time WiFi start was attempted
2585
-
2586
- // WiFi Timer usage:
2587
- // * Measure interval to display IP address
2588
- static unsigned long wifiDisplayTimer;
2589
-
2590
- static bool wifiStationRunning;
2591
- static bool wifiApRunning;
2592
-
2593
2580
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
2594
2581
// WiFi Routines
2595
2582
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
0 commit comments