Skip to content

Commit 5a0dae9

Browse files
committed
Extra getMode checks for AP+STA
1 parent addfba0 commit 5a0dae9

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

Firmware/RTK_Everywhere/AP-Config/src/main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,6 @@ function sendData() {
481481
//Check boxes, radio buttons
482482
//Remove file manager files
483483
clsElements = document.querySelectorAll(".form-check-input:not(.fileManagerCheck), .form-radio");
484-
485484
for (let x = 0; x < clsElements.length; x++) {
486485
settingCSV += clsElements[x].id + "," + clsElements[x].checked + ",";
487486
}

Firmware/RTK_Everywhere/Display.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2060,6 +2060,10 @@ void displayWiFiConfig()
20602060
else if (WiFi.getMode() == WIFI_AP)
20612061
snprintf(mySSID, sizeof(mySSID), "%s", "RTK Config");
20622062

2063+
// If we are in AP+STA mode, still display RTK Config
2064+
else if (WiFi.getMode() == WIFI_AP_STA)
2065+
snprintf(mySSID, sizeof(mySSID), "%s", "RTK Config");
2066+
20632067
else
20642068
snprintf(mySSID, sizeof(mySSID), "%s", "Error");
20652069
}
@@ -2093,7 +2097,7 @@ void displayWiFiConfig()
20932097

20942098
#ifdef COMPILE_AP
20952099
IPAddress myIpAddress;
2096-
if (WiFi.getMode() == WIFI_AP)
2100+
if ((WiFi.getMode() == WIFI_AP) || (WiFi.getMode() == WIFI_AP_STA))
20972101
myIpAddress = WiFi.softAPIP();
20982102
else
20992103
myIpAddress = WiFi.localIP();

Firmware/RTK_Everywhere/WiFi.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,8 @@ void wifiUpdate()
388388
break;
389389
}
390390

391-
// Process DNS when we are in AP mode for captive portal
392-
if (WiFi.getMode() == WIFI_AP && settings.enableCaptivePortal)
391+
// Process DNS when we are in AP mode or AP+STA mode for captive portal
392+
if (((WiFi.getMode() == WIFI_AP) || (WiFi.getMode() == WIFI_AP_STA)) && settings.enableCaptivePortal)
393393
{
394394
dnsServer.processNextRequest();
395395
}
@@ -435,7 +435,7 @@ void wifiStop()
435435
MDNS.end();
436436

437437
// Stop the DNS server if we were using the captive portal
438-
if (WiFi.getMode() == WIFI_AP && settings.enableCaptivePortal)
438+
if (((WiFi.getMode() == WIFI_AP) || (WiFi.getMode() == WIFI_AP_STA)) && settings.enableCaptivePortal)
439439
dnsServer.stop();
440440

441441
// Stop the other network clients and then WiFi

0 commit comments

Comments
 (0)