WiFi stayed active after disabling WiFi in menu
This commit is contained in:
+7
-1
@@ -560,11 +560,12 @@ void passwordcrypt() {
|
||||
}
|
||||
|
||||
void tryWiFi() {
|
||||
if (!setupmode) {
|
||||
if (!setupmode && wifi) {
|
||||
tft.drawRoundRect(1, 60, 319, 140, 5, ActiveColor);
|
||||
tft.fillRoundRect(3, 62, 315, 136, 5, BackgroundColor);
|
||||
tftPrint(0, myLanguage[language][55], 155, 88, ActiveColor, ActiveColorSmooth, 28);
|
||||
}
|
||||
if (wifi) {
|
||||
if (wc.autoConnect()) {
|
||||
Server.begin();
|
||||
Udp.begin(9031);
|
||||
@@ -580,4 +581,9 @@ void tryWiFi() {
|
||||
XDRGTKTCP = false;
|
||||
RDSSPYTCP = false;
|
||||
}
|
||||
} else {
|
||||
Server.end();
|
||||
Udp.stop();
|
||||
WiFi.mode(WIFI_OFF);
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -2268,9 +2268,9 @@ void DoMenu() {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (menupage == CONNECTIVITY && menuoption == ITEM2 && wifi) {
|
||||
if (menupage == CONNECTIVITY && menuoption == ITEM2) {
|
||||
tryWiFi();
|
||||
delay(2000);
|
||||
if (wifi) delay(2000);
|
||||
}
|
||||
if (menupage == DISPLAYSETTINGS && menuoption == ITEM5) {
|
||||
doTheme();
|
||||
|
||||
Reference in New Issue
Block a user