File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -640,7 +640,7 @@ static void startWiFi(unsigned long now)
640640 connectionState = wifiUpdate;
641641 }
642642
643- INFOLN (" Begin Webupdater" );
643+ DBGLN (" Begin Webupdater" );
644644
645645 WiFi.persistent (false );
646646 WiFi.disconnect ();
@@ -667,7 +667,7 @@ static void startWiFi(unsigned long now)
667667 changeTime = now;
668668 changeMode = WIFI_STA ;
669669 }
670- laststatus = WL_DISCONNECTED ;
670+ laststatus = WL_NO_SHIELD ;
671671 wifiStarted = true ;
672672}
673673
@@ -823,7 +823,7 @@ static void HandleWebUpdate()
823823 changeMode = WIFI_AP ;
824824 DBGLN (" Connection failed %d" , status);
825825 }
826- if (changeMode != wifiMode && changeMode != WIFI_OFF && (now - changeTime) > 500 ) {
826+ if (changeMode != wifiMode && changeMode != WIFI_OFF ) {
827827 switch (changeMode) {
828828 case WIFI_AP :
829829 DBGLN (" Changing to AP mode" );
@@ -1021,7 +1021,7 @@ static int timeout()
10211021}
10221022
10231023device_t WIFI_device = {
1024- .initialize = wifiOff ,
1024+ .initialize = nullptr ,
10251025 .start = start,
10261026 .event = event,
10271027 .timeout = timeout
Original file line number Diff line number Diff line change @@ -398,7 +398,6 @@ void setup()
398398 config.SetStartWiFiOnBoot (true );
399399 #endif
400400
401-
402401 if (config.GetStartWiFiOnBoot ())
403402 {
404403 wifiService = config.GetWiFiService ();
@@ -466,9 +465,9 @@ void loop()
466465 }
467466 #endif
468467
469- if (Serial.available ())
468+ while (Serial.available ())
470469 {
471- uint8_t c = Serial.read ();
470+ const uint8_t c = Serial.read ();
472471
473472 // Try to parse MSP packets from the TX
474473 if (msp.processReceivedByte (c))
You can’t perform that action at this time.
0 commit comments