%s"), HtmlEscape(ssid_copy).c_str());
}
-
skipduplicated = false;
String nextSSID = "";
// Handle all APs with the same SSID
@@ -1838,29 +1839,22 @@ void HandleWifiConfiguration(void) {
uint32_t rssi_as_quality = WifiGetRssiAsQuality(rssi);
uint32_t num_bars = changeUIntScale(rssi_as_quality, 0, 100, 0, 4);
+ WSContentSend_P(PSTR("
"), rssi, rssi_as_quality);
if (limitScannedNetworks) {
// Print SSID and item
- WSContentSend_P(PSTR("
%s"), rssi, rssi_as_quality, HtmlEscape(ssid).c_str());
- // Print signal strength indicator
- for (uint32_t k = 0; k < 4; ++k) {
- WSContentSend_P(PSTR(""), k, (num_bars < k) ? PSTR(" o30") : PSTR(""));
- }
- WSContentSend_P(PSTR("
"));
+ WSContentSend_P(PSTR("%s"), HtmlEscape(ssid_copy).c_str());
ssid_showed++;
skipduplicated = true; // For the simplified page, just show 1 SSID if there are many Networks with the same
} else {
// Print item
- WSContentSend_P(PSTR("
%s
(%d) "),
- rssi, rssi_as_quality,
- WiFi.BSSIDstr(indices[j]).c_str(),
- WiFi.channel(indices[j])
+ WSContentSend_P(PSTR("%s
(%d) "), WiFi.BSSIDstr(indices[j]).c_str(), WiFi.channel(indices[j])
);
- // Print signal strength indicator
- for (uint32_t k = 0; k < 4; ++k) {
- WSContentSend_P(PSTR(""), k, (num_bars < k) ? PSTR(" o30") : PSTR(""));
- }
- WSContentSend_P(PSTR("
"));
}
+ // Print signal strength indicator
+ for (uint32_t k = 0; k < 4; ++k) {
+ WSContentSend_P(PSTR(""), k, (num_bars < k) ? PSTR(" o30") : PSTR(""));
+ }
+ WSContentSend_P(PSTR(" "));
} else {
if (ssid_showed <= networksToShow ) { networksToShow++; }
}
@@ -1868,7 +1862,9 @@ void HandleWifiConfiguration(void) {
}
delay(0);
}
- WSContentSend_P(PSTR(" "));
+ if (!limitScannedNetworks) {
+ WSContentSend_P(PSTR("
"));
+ }
}
}
#else // No USE_ENHANCED_GUI_WIFI_SCAN
@@ -1892,18 +1888,10 @@ void HandleWifiConfiguration(void) {
DEBUG_CORE_LOG(PSTR(D_LOG_WIFI D_SSID " %s, " D_BSSID " %s, " D_CHANNEL " %d, " D_RSSI " %d"),
WiFi.SSID(indices[i]).c_str(), WiFi.BSSIDstr(indices[i]).c_str(), WiFi.channel(indices[i]), rssi);
int quality = WifiGetRssiAsQuality(rssi);
-/*
- int auth = WiFi.encryptionType(indices[i]);
- char encryption[20];
- WSContentSend_P(PSTR("
%s (%d) 
%s %d%% (%d dBm) "),
- HtmlEscape(WiFi.SSID(indices[i])).c_str(),
- WiFi.channel(indices[i]),
- GetTextIndexed(encryption, sizeof(encryption), auth +1, kEncryptionType),
- quality, rssi
- );
-*/
+ String ssid_copy = WiFi.SSID(indices[i]);
+ if (!ssid_copy.length()) { ssid_copy = F("no_name"); }
WSContentSend_P(PSTR("
%s (%d) 
%d%% (%d dBm) "),
- HtmlEscape(WiFi.SSID(indices[i])).c_str(),
+ HtmlEscape(ssid_copy).c_str(),
WiFi.channel(indices[i]),
quality, rssi
);