From 41e35af34c1b18571a29389dc854e776cc28db8f Mon Sep 17 00:00:00 2001 From: DL6ER Date: Fri, 25 Dec 2020 18:57:04 +0100 Subject: [PATCH] Leave off WiFi encryption string processing to save Flash space. Signed-off-by: DL6ER --- tasmota/language/bg_BG.h | 3 --- tasmota/language/cs_CZ.h | 3 --- tasmota/language/de_DE.h | 3 --- tasmota/language/el_GR.h | 3 --- tasmota/language/en_GB.h | 3 --- tasmota/language/es_ES.h | 3 --- tasmota/language/fr_FR.h | 3 --- tasmota/language/he_HE.h | 3 --- tasmota/language/hu_HU.h | 3 --- tasmota/language/it_IT.h | 3 --- tasmota/language/ko_KO.h | 3 --- tasmota/language/nl_NL.h | 3 --- tasmota/language/pl_PL.h | 3 --- tasmota/language/pt_BR.h | 3 --- tasmota/language/pt_PT.h | 3 --- tasmota/language/ro_RO.h | 3 --- tasmota/language/ru_RU.h | 3 --- tasmota/language/sk_SK.h | 3 --- tasmota/language/sv_SE.h | 3 --- tasmota/language/tr_TR.h | 3 --- tasmota/language/uk_UA.h | 3 --- tasmota/language/vi_VN.h | 3 --- tasmota/language/zh_CN.h | 3 --- tasmota/language/zh_TW.h | 3 --- tasmota/xdrv_01_webserver.ino | 17 ++++------------- 25 files changed, 4 insertions(+), 85 deletions(-) diff --git a/tasmota/language/bg_BG.h b/tasmota/language/bg_BG.h index f76227129d00..4369ab20845f 100644 --- a/tasmota/language/bg_BG.h +++ b/tasmota/language/bg_BG.h @@ -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" diff --git a/tasmota/language/cs_CZ.h b/tasmota/language/cs_CZ.h index 49eed19d6e63..cd259f58086d 100644 --- a/tasmota/language/cs_CZ.h +++ b/tasmota/language/cs_CZ.h @@ -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" diff --git a/tasmota/language/de_DE.h b/tasmota/language/de_DE.h index 0a0242ff282f..6ae7ddc1acee 100644 --- a/tasmota/language/de_DE.h +++ b/tasmota/language/de_DE.h @@ -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" diff --git a/tasmota/language/el_GR.h b/tasmota/language/el_GR.h index 8e6a0705350b..849bc29cba58 100644 --- a/tasmota/language/el_GR.h +++ b/tasmota/language/el_GR.h @@ -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" diff --git a/tasmota/language/en_GB.h b/tasmota/language/en_GB.h index a2e32ec75a8b..1f3fb6b807c0 100644 --- a/tasmota/language/en_GB.h +++ b/tasmota/language/en_GB.h @@ -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" diff --git a/tasmota/language/es_ES.h b/tasmota/language/es_ES.h index 523330170fc0..68f104338705 100644 --- a/tasmota/language/es_ES.h +++ b/tasmota/language/es_ES.h @@ -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" diff --git a/tasmota/language/fr_FR.h b/tasmota/language/fr_FR.h index 311c18330e3c..c09a113714c6 100644 --- a/tasmota/language/fr_FR.h +++ b/tasmota/language/fr_FR.h @@ -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" diff --git a/tasmota/language/he_HE.h b/tasmota/language/he_HE.h index 4a92e16bd986..850009afd2ab 100644 --- a/tasmota/language/he_HE.h +++ b/tasmota/language/he_HE.h @@ -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" diff --git a/tasmota/language/hu_HU.h b/tasmota/language/hu_HU.h index fdd0ee135895..9483c330f109 100644 --- a/tasmota/language/hu_HU.h +++ b/tasmota/language/hu_HU.h @@ -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" diff --git a/tasmota/language/it_IT.h b/tasmota/language/it_IT.h index 349fd2d5153c..ce890da0ea52 100644 --- a/tasmota/language/it_IT.h +++ b/tasmota/language/it_IT.h @@ -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" diff --git a/tasmota/language/ko_KO.h b/tasmota/language/ko_KO.h index ce1875811b51..dbdcd6d414de 100644 --- a/tasmota/language/ko_KO.h +++ b/tasmota/language/ko_KO.h @@ -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" diff --git a/tasmota/language/nl_NL.h b/tasmota/language/nl_NL.h index 7af1e9ca2109..456f71ab311e 100644 --- a/tasmota/language/nl_NL.h +++ b/tasmota/language/nl_NL.h @@ -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" diff --git a/tasmota/language/pl_PL.h b/tasmota/language/pl_PL.h index c9a74883db08..8d0f6c1c6ccb 100644 --- a/tasmota/language/pl_PL.h +++ b/tasmota/language/pl_PL.h @@ -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" diff --git a/tasmota/language/pt_BR.h b/tasmota/language/pt_BR.h index 019b8f7b21ec..b4fde5b5e171 100644 --- a/tasmota/language/pt_BR.h +++ b/tasmota/language/pt_BR.h @@ -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" diff --git a/tasmota/language/pt_PT.h b/tasmota/language/pt_PT.h index dcedf1f01ab7..c02d88b139ee 100644 --- a/tasmota/language/pt_PT.h +++ b/tasmota/language/pt_PT.h @@ -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" diff --git a/tasmota/language/ro_RO.h b/tasmota/language/ro_RO.h index 27edbd65b559..02acc0bbefc3 100644 --- a/tasmota/language/ro_RO.h +++ b/tasmota/language/ro_RO.h @@ -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" diff --git a/tasmota/language/ru_RU.h b/tasmota/language/ru_RU.h index 80334cdcce3a..b94f21e632c7 100644 --- a/tasmota/language/ru_RU.h +++ b/tasmota/language/ru_RU.h @@ -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" diff --git a/tasmota/language/sk_SK.h b/tasmota/language/sk_SK.h index 6a26a9da333f..682fe8a9d146 100644 --- a/tasmota/language/sk_SK.h +++ b/tasmota/language/sk_SK.h @@ -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" diff --git a/tasmota/language/sv_SE.h b/tasmota/language/sv_SE.h index 71f613a1ecf4..995a816d685f 100644 --- a/tasmota/language/sv_SE.h +++ b/tasmota/language/sv_SE.h @@ -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" diff --git a/tasmota/language/tr_TR.h b/tasmota/language/tr_TR.h index 268ae77cfaeb..5a01d4a06b65 100644 --- a/tasmota/language/tr_TR.h +++ b/tasmota/language/tr_TR.h @@ -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" diff --git a/tasmota/language/uk_UA.h b/tasmota/language/uk_UA.h index a0b3513db42d..7aa61c094209 100644 --- a/tasmota/language/uk_UA.h +++ b/tasmota/language/uk_UA.h @@ -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" diff --git a/tasmota/language/vi_VN.h b/tasmota/language/vi_VN.h index 745c54748a1b..3fcee4395308 100644 --- a/tasmota/language/vi_VN.h +++ b/tasmota/language/vi_VN.h @@ -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" diff --git a/tasmota/language/zh_CN.h b/tasmota/language/zh_CN.h index 4e28eb225059..a584682f1c83 100644 --- a/tasmota/language/zh_CN.h +++ b/tasmota/language/zh_CN.h @@ -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 名称" diff --git a/tasmota/language/zh_TW.h b/tasmota/language/zh_TW.h index 0f169dbfc5a4..e3cf64fd197b 100644 --- a/tasmota/language/zh_TW.h +++ b/tasmota/language/zh_TW.h @@ -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" diff --git a/tasmota/xdrv_01_webserver.ino b/tasmota/xdrv_01_webserver.ino index e99a6a2c4f94..46f5983146d3 100644 --- a/tasmota/xdrv_01_webserver.ino +++ b/tasmota/xdrv_01_webserver.ino @@ -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; } @@ -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("
%s
    "), HtmlEscape(ssid).c_str() ); @@ -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) { @@ -2147,8 +2141,7 @@ void HandleWifiConfiguration(void) colors[1] = (0xFF * quality)/50; } // Print item - WSContentSend_P(PSTR("
  • %s, Channel %d, Quality %d%%
  • "), - GetTextIndexed(encryption, sizeof(encryption), auth +1, kEncryptionType), + WSContentSend_P(PSTR("
  • %s, CH %d, Quality %d%%
  • "), rssi, WiFi.BSSIDstr(indices[i+j]).c_str(), WiFi.channel(indices[i+j]), colors[0], colors[1], quality ); @@ -2158,8 +2151,6 @@ void HandleWifiConfiguration(void) i += j; WSContentSend_P(PSTR("
")); - - delay(0); } WSContentSend_P(PSTR("
"));