File tree Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,11 @@ GNSS_ZED.ino
77#ifdef COMPILE_ZED
88
99extern int NTRIPCLIENT_MS_BETWEEN_GGA;
10+
11+ #ifdef COMPILE_NETWORK
1012extern NetworkClient *ntripClient;
13+ #endif // COMPILE_NETWORK
14+
1115extern unsigned long lastGGAPush;
1216
1317// ----------------------------------------
Original file line number Diff line number Diff line change 1919
2020int wifiConnectionAttempts; // Count the number of connection attempts between restarts
2121
22+ bool restartWiFi = false ; // Restart WiFi if user changes anything
23+
2224#ifdef COMPILE_WIFI
2325
2426// ----------------------------------------
@@ -51,8 +53,6 @@ static DNSServer dnsServer;
5153
5254static bool wifiRunning;
5355
54- bool restartWiFi = false ; // Restart WiFi if user changes anything
55-
5656// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
5757// WiFi Routines
5858// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -421,8 +421,15 @@ int wifiNetworkCount()
421421// ----------------------------------------
422422void wifiRestart ()
423423{
424- wifiStop ();
425- wifiStart ();
424+ // Restart the AP webserver if we are in that state
425+ if (systemState == STATE_WIFI_CONFIG)
426+ requestChangeState (STATE_WIFI_CONFIG_NOT_STARTED);
427+ else
428+ {
429+ // Restart WiFi if we are not in AP config mode
430+ WIFI_STOP ();
431+ wifiStart ();
432+ }
426433}
427434
428435// ----------------------------------------
Original file line number Diff line number Diff line change @@ -342,15 +342,7 @@ void menuMain()
342342 {
343343 restartWiFi = false ;
344344
345- // Restart the AP webserver if we are in that state
346- if (systemState == STATE_WIFI_CONFIG)
347- requestChangeState (STATE_WIFI_CONFIG_NOT_STARTED);
348- else
349- {
350- // Restart WiFi if we are not in AP config mode
351- WIFI_STOP ();
352- wifiStart ();
353- }
345+ wifiRestart ();
354346 }
355347
356348 clearBuffer (); // Empty buffer of any newline chars
You can’t perform that action at this time.
0 commit comments