@@ -223,7 +223,7 @@ void wifiNmeaData(uint8_t * data, uint16_t length)
223223 {
224224 // Start the NMEA client if enabled
225225 if (((!wifiNmeaClient[0 ]) || (!wifiNmeaClient[0 ].connected ()))
226- && ((millis () - lastNmeaConnectAttempt) >= 1000 ))
226+ && ((millis () - lastNmeaConnectAttempt) >= 1000 ))
227227 {
228228 lastNmeaConnectAttempt = millis ();
229229 ipAddress[0 ] = WiFi.gatewayIP ();
@@ -243,7 +243,7 @@ void wifiNmeaData(uint8_t * data, uint16_t length)
243243 {
244244 // Release any allocated resources
245245 // if (wifiNmeaClient[0])
246- wifiNmeaClient[0 ].stop ();
246+ wifiNmeaClient[0 ].stop ();
247247 }
248248 }
249249 }
@@ -278,8 +278,8 @@ void wifiNmeaData(uint8_t * data, uint16_t length)
278278
279279 // Send the NMEA data to the connected clients
280280 else if (((settings.enableNmeaServer && online.nmeaServer )
281- || (settings.enableNmeaClient && online.nmeaClient ))
282- && ((!length) || (wifiNmeaClient[index].write (data, length) == length)))
281+ || (settings.enableNmeaClient && online.nmeaClient ))
282+ && ((!length) || (wifiNmeaClient[index].write (data, length) == length)))
283283 {
284284 if (settings.enablePrintNmeaTcpStatus && length)
285285 Serial.printf (" NMEA %d bytes written\r\n " , length);
@@ -324,6 +324,9 @@ bool wifiNmeaTcpServerActive()
324324void wifiStart (char * ssid, char * pw)
325325{
326326#ifdef COMPILE_WIFI
327+ #ifdef COMPILE_ESPNOW
328+ bool restartESPNow = false ;
329+ #endif
327330
328331 if ((wifiState == WIFI_OFF) || (wifiState == WIFI_ON))
329332 {
@@ -453,7 +456,7 @@ void wifiUpdate()
453456
454457 // Start the NMEA client if enabled
455458 if (settings.enableNmeaClient && (!online.nmeaClient ) && (!settings.enableNmeaServer )
456- && (wifiState == WIFI_CONNECTED))
459+ && (wifiState == WIFI_CONNECTED))
457460 {
458461 online.nmeaClient = true ;
459462 Serial.print (" NMEA TCP client online, local IP " );
@@ -464,7 +467,7 @@ void wifiUpdate()
464467
465468 // Start the NMEA server if enabled
466469 if ((!wifiNmeaServer) && (!settings.enableNmeaClient ) && settings.enableNmeaServer
467- && (wifiState == WIFI_CONNECTED))
470+ && (wifiState == WIFI_CONNECTED))
468471 {
469472 wifiNmeaServer.begin ();
470473 online.nmeaServer = true ;
0 commit comments