Skip to content

Commit 7231e20

Browse files
committed
Display RTK Config when local WiFi config fails.
1 parent 9f6d954 commit 7231e20

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Firmware/RTK_Surveyor/Display.ino

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2041,7 +2041,17 @@ void displayWiFiConfig()
20412041
if (settings.wifiConfigOverAP == true)
20422042
snprintf(mySSID, sizeof(mySSID), "%s", "RTK Config");
20432043
else
2044-
snprintf(mySSID, sizeof(mySSID), "%s", WiFi.SSID().c_str());
2044+
{
2045+
if(WiFi.getMode() == WIFI_STA)
2046+
snprintf(mySSID, sizeof(mySSID), "%s", WiFi.SSID().c_str());
2047+
2048+
//If we failed to connect to a friendly WiFi, and then fell back to AP mode, still display RTK Config
2049+
else if(WiFi.getMode() == WIFI_AP)
2050+
snprintf(mySSID, sizeof(mySSID), "%s", "RTK Config");
2051+
2052+
else
2053+
snprintf(mySSID, sizeof(mySSID), "%s", "Error");
2054+
}
20452055
#else // COMPILE_WIFI
20462056
snprintf(mySSID, sizeof(mySSID), "%s", "!Compiled");
20472057
#endif // COMPILE_WIFI

0 commit comments

Comments
 (0)