Skip to content

Commit 2c863af

Browse files
committed
Fix Normal TLM mode wifi
1 parent 7057a83 commit 2c863af

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

lib/WIFI/devWIFI.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

10231023
device_t WIFI_device = {
1024-
.initialize = wifiOff,
1024+
.initialize = nullptr,
10251025
.start = start,
10261026
.event = event,
10271027
.timeout = timeout

src/Tx_main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff 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))

0 commit comments

Comments
 (0)