Skip to content

Commit

Permalink
Leave off WiFi encryption string processing to save Flash space.
Browse files Browse the repository at this point in the history
Signed-off-by: DL6ER <dl6er@dl6er.de>
  • Loading branch information
DL6ER committed Dec 25, 2020
1 parent 1decd0e commit 41e35af
Show file tree
Hide file tree
Showing 25 changed files with 4 additions and 85 deletions.
3 changes: 0 additions & 3 deletions tasmota/language/bg_BG.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "Дублиране на точката за достъп (AP)"
#define D_SKIPPING_LOW_QUALITY "Пропускане поради лошо качество"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 SSId"
#define D_AP1_PASSWORD "AP1 Парола"
#define D_AP2_SSID "AP2 SSId"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/cs_CZ.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "Kopie AP"
#define D_SKIPPING_LOW_QUALITY "Přeskočení z důvodu kvality signálu"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 SSID"
#define D_AP1_PASSWORD "Heslo AP1"
#define D_AP2_SSID "AP2 SSID"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/de_DE.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "AccessPoint duplizieren"
#define D_SKIPPING_LOW_QUALITY "überspringe wegen niedriger Qualität"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA-PSK"
#define D_WPA2_PSK "WPA2-PSK"
#define D_AP1_SSID "WLAN 1 - SSID"
#define D_AP1_PASSWORD "WLAN 1 - Passwort"
#define D_AP2_SSID "WLAN 2 - SSID"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/el_GR.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "Διπλότυπο AccessPoint"
#define D_SKIPPING_LOW_QUALITY "Παράκαμψη λόγω χαμηλής ποιότητας"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 SSId"
#define D_AP1_PASSWORD "AP1 Κωδικός"
#define D_AP2_SSID "AP2 SSId"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/en_GB.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "Duplicate AccessPoint"
#define D_SKIPPING_LOW_QUALITY "Skipping due to low quality"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 SSId"
#define D_AP1_PASSWORD "AP1 Password"
#define D_AP2_SSID "AP2 SSId"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/es_ES.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "AccessPoint duplicado"
#define D_SKIPPING_LOW_QUALITY "Ignorado por baja calidad"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "SSId AP1"
#define D_AP1_PASSWORD "Clave AP1"
#define D_AP2_SSID "SSId AP2"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/fr_FR.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,6 @@
#define D_DUPLICATE_ACCESSPOINT "Point d'Accès dupliqué"
#define D_SKIPPING_LOW_QUALITY "Évité car de mauvaise qualité"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 SSID"
#define D_AP1_PASSWORD "Mot de passe AP1"
#define D_AP2_SSID "AP2 SSId"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/he_HE.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "נקודות גישה משוכפלות"
#define D_SKIPPING_LOW_QUALITY "מדלג עקב איכות רשת נמוכה"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 SSId"
#define D_AP1_PASSWORD "AP1 Password"
#define D_AP2_SSID "AP2 SSId"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/hu_HU.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "Duplikált access point"
#define D_SKIPPING_LOW_QUALITY "Rossz, alacsony jelminőség"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 SSID"
#define D_AP1_PASSWORD "AP1 megosztott kulcs"
#define D_AP2_SSID "AP2 SSID"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/it_IT.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "Access Point duplicato"
#define D_SKIPPING_LOW_QUALITY "Ignorato a causa di bassa qualità"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 - SSID"
#define D_AP1_PASSWORD "AP1 - Password"
#define D_AP2_SSID "AP2 - SSID"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/ko_KO.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "중복된 AccessPoint"
#define D_SKIPPING_LOW_QUALITY "약한 네트워크 신호 무시"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 SSId"
#define D_AP1_PASSWORD "AP1 비밀번호"
#define D_AP2_SSID "AP2 SSId"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/nl_NL.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "Dubbel AccessPoint"
#define D_SKIPPING_LOW_QUALITY "Overslaan agv lage ontvangskwaliteit"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 SSId"
#define D_AP1_PASSWORD "AP1 Wachtwoord"
#define D_AP2_SSID "AP2 SSId"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/pl_PL.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "Duplikuj"
#define D_SKIPPING_LOW_QUALITY "Pominięto z powodu niskiej jakości sygnału"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "Nazwa 1"
#define D_AP1_PASSWORD "Hasło 1"
#define D_AP2_SSID "Nazwa 2"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/pt_BR.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "Ponto de Acesso duplicado"
#define D_SKIPPING_LOW_QUALITY "Ignorado devido à baixa qualidade do sinal"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 SSId"
#define D_AP1_PASSWORD "Senha AP1"
#define D_AP2_SSID "AP2 SSId"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/pt_PT.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "Duplicar ponto de Acesso"
#define D_SKIPPING_LOW_QUALITY "Ignorado devido a baixa qualidade do sinal"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "SSId do AP1"
#define D_AP1_PASSWORD "Palavra Chave do AP1"
#define D_AP2_SSID "SSId do AP2"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/ro_RO.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "Clonează AccessPoint"
#define D_SKIPPING_LOW_QUALITY "Omite,joasă calitate"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 SSId"
#define D_AP1_PASSWORD "Parolă AP1"
#define D_AP2_SSID "AP2 SSId"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/ru_RU.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "Дублировать Точку Доступа (AP)"
#define D_SKIPPING_LOW_QUALITY "Пропущено из-за низкого качества"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 SSId"
#define D_AP1_PASSWORD "AP1 Пароль"
#define D_AP2_SSID "AP2 SSId"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/sk_SK.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "Kópia AP"
#define D_SKIPPING_LOW_QUALITY "Preskočenie z dôvodu kvality signálu"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 SSID"
#define D_AP1_PASSWORD "Heslo AP1"
#define D_AP2_SSID "AP2 SSID"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/sv_SE.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "Dubblett accesspunkt"
#define D_SKIPPING_LOW_QUALITY "Hoppa över pga dålig kvalitet"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 SSId"
#define D_AP1_PASSWORD "AP1 lösenord"
#define D_AP2_SSID "AP2 SSId"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/tr_TR.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "AP'yi çoğalt"
#define D_SKIPPING_LOW_QUALITY "Düşük kalitedekileri dikkate alma"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 Adı (SSId)"
#define D_AP1_PASSWORD "AP1 Parolası"
#define D_AP2_SSID "AP2 SSId"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/uk_UA.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "Дублювати Точку Доступу (AP)"
#define D_SKIPPING_LOW_QUALITY "Пропущено через низьку якість"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 SSID"
#define D_AP1_PASSWORD "AP1 гасло"
#define D_AP2_SSID "AP2 SSID"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/vi_VN.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "Điểm truy cập trùng lặp"
#define D_SKIPPING_LOW_QUALITY "Bỏ qua do tín hiệu kém"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "Tên mạng wifi 1"
#define D_AP1_PASSWORD "Mật khẩu mạng wifi 1"
#define D_AP2_SSID "Tên mạng wifi 2"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/zh_CN.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "重复AP"
#define D_SKIPPING_LOW_QUALITY "忽略弱信号网络"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "AP1 名称"
#define D_AP1_PASSWORD "AP1 密码"
#define D_AP2_SSID "AP2 名称"
Expand Down
3 changes: 0 additions & 3 deletions tasmota/language/zh_TW.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@
#define D_DUPLICATE_ACCESSPOINT "重覆的存取點"
#define D_SKIPPING_LOW_QUALITY "正在忽略訊號品質不佳的訊號"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA PSK"
#define D_WPA2_PSK "WPA2 PSK"
#define D_AP1_SSID "存取點1 SSID"
#define D_AP1_PASSWORD "存取點1 密碼"
#define D_AP2_SSID "存取點2 SSID"
Expand Down
17 changes: 4 additions & 13 deletions tasmota/xdrv_01_webserver.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2067,9 +2067,6 @@ String HtmlEscape(const String unescaped) {
return result;
}

// Indexed by enum wl_enc_type in file wl_definitions.h starting from -1
const char kEncryptionType[] PROGMEM = "|||" D_WPA_PSK "||" D_WPA2_PSK "|" D_WEP "||" D_NONE "|" D_AUTO;

void HandleWifiConfiguration(void)
{
if (!HttpCheckPriviledgedAccess(!WifiIsInManagerMode())) { return; }
Expand Down Expand Up @@ -2118,14 +2115,11 @@ void HandleWifiConfiguration(void)
uint32_t i = 0;
while (i < n) {
int32_t rssi = WiFi.RSSI(indices[i]);
String ssid = WiFi.SSID(indices[i]);
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];
ssid.c_str(), WiFi.BSSIDstr(indices[i]).c_str(), WiFi.channel(indices[i]), rssi);

// Print SSID
String ssid = WiFi.SSID(indices[i]);
WSContentSend_P(PSTR("<div><a href='#p' onclick='c(this)'>%s</a><br><ul>"),
HtmlEscape(ssid).c_str()
);
Expand All @@ -2136,7 +2130,7 @@ void HandleWifiConfiguration(void)
while((i+j) < n && (nextSSID = WiFi.SSID(indices[i+j])) == ssid) {
// Update RSSI / quality
rssi = WiFi.RSSI(indices[i+j]);
quality = WifiGetRssiAsQuality(rssi);
int quality = WifiGetRssiAsQuality(rssi);
// Color-code quality
uint8_t colors[2] = { 0xFF, 0xFF };
if(quality > 50) {
Expand All @@ -2147,8 +2141,7 @@ void HandleWifiConfiguration(void)
colors[1] = (0xFF * quality)/50;
}
// Print item
WSContentSend_P(PSTR("<li title='%s, Signal: %d dBm'>%s, Channel %d, <span style='color:#%02X%02X00'>Quality %d%%</span></li>"),
GetTextIndexed(encryption, sizeof(encryption), auth +1, kEncryptionType),
WSContentSend_P(PSTR("<li title='%d dBm'>%s, CH %d, <span style='color:#%02X%02X00'>Quality %d%%</span></li>"),
rssi, WiFi.BSSIDstr(indices[i+j]).c_str(),
WiFi.channel(indices[i+j]), colors[0], colors[1], quality
);
Expand All @@ -2158,8 +2151,6 @@ void HandleWifiConfiguration(void)
i += j;

WSContentSend_P(PSTR("</ul></div>"));

delay(0);

}
WSContentSend_P(PSTR("<br>"));
Expand Down

0 comments on commit 41e35af

Please sign in to comment.