Skip to content

Commit b8d4bfa

Browse files
committed
Fixes the WiFi getting stuck in STA mode when exiting back to menu without connecting to any AP. Fixes the error message display in AP-Info clipping the border
1 parent c96847b commit b8d4bfa

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/core/wifi/wifi_common.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,11 @@ bool wifiConnectMenu(wifi_mode_t mode) {
195195
break;
196196
}
197197

198-
if (returnToMenu) return false;
198+
if (returnToMenu)
199+
{
200+
wifiDisconnect(); // Forced turning of the Wifi module if exiting back to menu
201+
return false;
202+
}
199203
return wifiConnected;
200204
}
201205

src/modules/wifi/ap_info.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ void fillInfo(ScrollableTextArea &area) {
8282
default: err = "failed with" + String(res); break;
8383
}
8484

85-
tft.print(err);
85+
area.addLine(err);
86+
area.show();
8687

8788
while (check(SelPress)) yield();
8889
while (!check(SelPress)) yield();

0 commit comments

Comments
 (0)