From 5f53f36563f9aaf2ee4af298bc215960f5d5d81d Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 14 May 2022 17:41:52 +0200 Subject: [PATCH] Add ESP32 partition info to GUI --- tasmota/language/af_AF.h | 2 ++ tasmota/language/bg_BG.h | 2 ++ tasmota/language/cs_CZ.h | 2 ++ tasmota/language/de_DE.h | 2 ++ tasmota/language/el_GR.h | 2 ++ tasmota/language/en_GB.h | 2 ++ tasmota/language/es_ES.h | 2 ++ tasmota/language/fr_FR.h | 2 ++ tasmota/language/fy_NL.h | 2 ++ tasmota/language/he_HE.h | 2 ++ tasmota/language/hu_HU.h | 2 ++ tasmota/language/it_IT.h | 2 ++ tasmota/language/ko_KO.h | 2 ++ tasmota/language/nl_NL.h | 2 ++ tasmota/language/pl_PL.h | 2 ++ tasmota/language/pt_BR.h | 2 ++ tasmota/language/pt_PT.h | 2 ++ tasmota/language/ro_RO.h | 2 ++ tasmota/language/ru_RU.h | 2 ++ tasmota/language/sk_SK.h | 2 ++ tasmota/language/sv_SE.h | 2 ++ tasmota/language/tr_TR.h | 2 ++ tasmota/language/uk_UA.h | 2 ++ tasmota/language/vi_VN.h | 2 ++ tasmota/language/zh_CN.h | 2 ++ tasmota/language/zh_TW.h | 2 ++ tasmota/support_esp.ino | 28 ++++++++++++++++++++++++++++ tasmota/xdrv_01_webserver.ino | 16 ++++++++++++++++ 28 files changed, 96 insertions(+) diff --git a/tasmota/language/af_AF.h b/tasmota/language/af_AF.h index 825d23be4..968c0e1cd 100644 --- a/tasmota/language/af_AF.h +++ b/tasmota/language/af_AF.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Wagwoord" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Poort" #define D_POWER_FACTOR "Krag faktor" #define D_POWERUSAGE "Krag" @@ -183,6 +184,7 @@ #define D_UPGRADE "opgradeer" #define D_UPLOAD "Laai op" #define D_UPTIME "Uptyd" +#define D_USED "used" #define D_USER "Gebruiker" #define D_UTC_TIME "UTC" #define D_UV_INDEX "UV Indeks" diff --git a/tasmota/language/bg_BG.h b/tasmota/language/bg_BG.h index c3af37b86..c59f70c66 100644 --- a/tasmota/language/bg_BG.h +++ b/tasmota/language/bg_BG.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Парола" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Порт" #define D_POWER_FACTOR "Фактор на мощността" #define D_POWERUSAGE "Мощност" @@ -183,6 +184,7 @@ #define D_UPGRADE "Обновяване" #define D_UPLOAD "Качването е" #define D_UPTIME "Време на работа" +#define D_USED "used" #define D_USER "Потребител" #define D_UTC_TIME "UTC" #define D_UV_INDEX "Индекс на UV" diff --git a/tasmota/language/cs_CZ.h b/tasmota/language/cs_CZ.h index 74a161c07..b1b1ec1ab 100644 --- a/tasmota/language/cs_CZ.h +++ b/tasmota/language/cs_CZ.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Heslo" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Port" #define D_POWER_FACTOR "Účiník" #define D_POWERUSAGE "Příkon" @@ -183,6 +184,7 @@ #define D_UPGRADE "aktualizace" #define D_UPLOAD "Nahrání..." #define D_UPTIME "Uptime" +#define D_USED "used" #define D_USER "Uživatel" #define D_UTC_TIME "UTC" #define D_UV_INDEX "UV Index" diff --git a/tasmota/language/de_DE.h b/tasmota/language/de_DE.h index 545e376c8..1d7916525 100644 --- a/tasmota/language/de_DE.h +++ b/tasmota/language/de_DE.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Passwort" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Port" #define D_POWER_FACTOR "Leistungsfaktor" #define D_POWERUSAGE "Leistung" @@ -183,6 +184,7 @@ #define D_UPGRADE "update" #define D_UPLOAD "Upload" #define D_UPTIME "Laufzeit" +#define D_USED "used" #define D_USER "Benutzer" #define D_UTC_TIME "UTC" #define D_UV_INDEX "UV-Index" diff --git a/tasmota/language/el_GR.h b/tasmota/language/el_GR.h index 2c7678402..45c6f9038 100644 --- a/tasmota/language/el_GR.h +++ b/tasmota/language/el_GR.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Κωδικός" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Θύρα" #define D_POWER_FACTOR "Συντελεστής Ισχύος" #define D_POWERUSAGE "Ισχύς" @@ -183,6 +184,7 @@ #define D_UPGRADE "αναβάθμιση" #define D_UPLOAD "Ανέβασμα" #define D_UPTIME "Χρόνος λειτουργίας" +#define D_USED "used" #define D_USER "Χρήστης" #define D_UTC_TIME "UTC" #define D_UV_INDEX "Δείκτης UV" diff --git a/tasmota/language/en_GB.h b/tasmota/language/en_GB.h index 1a0a40251..ba25d36ae 100644 --- a/tasmota/language/en_GB.h +++ b/tasmota/language/en_GB.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Password" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Port" #define D_POWER_FACTOR "Power Factor" #define D_POWERUSAGE "Power" @@ -183,6 +184,7 @@ #define D_UPGRADE "upgrade" #define D_UPLOAD "Upload" #define D_UPTIME "Uptime" +#define D_USED "used" #define D_USER "User" #define D_UTC_TIME "UTC" #define D_UV_INDEX "UV Index" diff --git a/tasmota/language/es_ES.h b/tasmota/language/es_ES.h index a8f9af1d3..acc71ce36 100644 --- a/tasmota/language/es_ES.h +++ b/tasmota/language/es_ES.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Clave" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Puerto" #define D_POWER_FACTOR "Factor de Potencia" #define D_POWERUSAGE "Potencia" @@ -183,6 +184,7 @@ #define D_UPGRADE "Actualización" #define D_UPLOAD "Carga" #define D_UPTIME "Tiempo Encendido" +#define D_USED "used" #define D_USER "Usuario" #define D_UTC_TIME "UTC" #define D_UV_INDEX "Índice UV" diff --git a/tasmota/language/fr_FR.h b/tasmota/language/fr_FR.h index a91d40aa2..c27665fe7 100644 --- a/tasmota/language/fr_FR.h +++ b/tasmota/language/fr_FR.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Mot de passe" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Port" #define D_POWER_FACTOR "Fact de puiss" #define D_POWERUSAGE "Puissance" @@ -183,6 +184,7 @@ #define D_UPGRADE "la mise à jour" // "Lancer la mise à jour" #define D_UPLOAD "Upload" // Not better in french #define D_UPTIME "Durée d'activité" +#define D_USED "used" #define D_USER "Utilisateur" #define D_UTC_TIME "UTC" #define D_UV_INDEX "Indice UV" diff --git a/tasmota/language/fy_NL.h b/tasmota/language/fy_NL.h index 66fbd2807..db6150f80 100644 --- a/tasmota/language/fy_NL.h +++ b/tasmota/language/fy_NL.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Wachtwurd" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Poort" #define D_POWER_FACTOR "Krêftfaktor" #define D_POWERUSAGE "Krêft" @@ -183,6 +184,7 @@ #define D_UPGRADE "upgrade" #define D_UPLOAD "Stjoere" #define D_UPTIME "Betjenstiid" +#define D_USED "used" #define D_USER "Brûker" #define D_UTC_TIME "UTC" #define D_UV_INDEX "UV-index" diff --git a/tasmota/language/he_HE.h b/tasmota/language/he_HE.h index ede44be67..9ca125c10 100644 --- a/tasmota/language/he_HE.h +++ b/tasmota/language/he_HE.h @@ -140,6 +140,7 @@ #define D_PASSWORD "סיסמא" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "פורט" #define D_POWER_FACTOR "גורם כוח" #define D_POWERUSAGE "כוח" @@ -183,6 +184,7 @@ #define D_UPGRADE "שדרוג" #define D_UPLOAD "העלאה" #define D_UPTIME "זמן עליה" +#define D_USED "used" #define D_USER "משתמש" #define D_UTC_TIME "UTC" #define D_UV_INDEX "UV אינדקס" diff --git a/tasmota/language/hu_HU.h b/tasmota/language/hu_HU.h index 85e025581..ee64407b3 100644 --- a/tasmota/language/hu_HU.h +++ b/tasmota/language/hu_HU.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Jelszó" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Port" #define D_POWER_FACTOR "Teljesítménytényező" #define D_POWERUSAGE "Energiafelhasználás" @@ -183,6 +184,7 @@ #define D_UPGRADE "Frissítés" #define D_UPLOAD "Feltöltés" #define D_UPTIME "Üzemidő" +#define D_USED "used" #define D_USER "Felhasználó" #define D_UTC_TIME "UTC" #define D_UV_INDEX "UV index" diff --git a/tasmota/language/it_IT.h b/tasmota/language/it_IT.h index 90a977c7a..c494f382a 100644 --- a/tasmota/language/it_IT.h +++ b/tasmota/language/it_IT.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Password" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Porta" #define D_POWER_FACTOR "Fattore di potenza" #define D_POWERUSAGE "Potenza" @@ -183,6 +184,7 @@ #define D_UPGRADE "aggiornamento" #define D_UPLOAD "Caricamento" #define D_UPTIME "Tempo accensione" +#define D_USED "used" #define D_USER "Utente" #define D_UTC_TIME "UTC" #define D_UV_INDEX "Indice UV" diff --git a/tasmota/language/ko_KO.h b/tasmota/language/ko_KO.h index c70b64479..40f4cd824 100644 --- a/tasmota/language/ko_KO.h +++ b/tasmota/language/ko_KO.h @@ -140,6 +140,7 @@ #define D_PASSWORD "비밀번호" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "포트" #define D_POWER_FACTOR "Power Factor" #define D_POWERUSAGE "전원" @@ -183,6 +184,7 @@ #define D_UPGRADE "업그레이드" #define D_UPLOAD "업로드" #define D_UPTIME "가동시간" +#define D_USED "used" #define D_USER "User" #define D_UTC_TIME "UTC" #define D_UV_INDEX "UV 색인" diff --git a/tasmota/language/nl_NL.h b/tasmota/language/nl_NL.h index 8ff61cd1c..0e5cf5a06 100644 --- a/tasmota/language/nl_NL.h +++ b/tasmota/language/nl_NL.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Wachtwoord" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Poort" #define D_POWER_FACTOR "Arbeidsfactor" #define D_POWERUSAGE "Vermogen" @@ -183,6 +184,7 @@ #define D_UPGRADE "opwaarderen" #define D_UPLOAD "Verzenden" #define D_UPTIME "Bedrijfstijd" +#define D_USED "used" #define D_USER "Gebruiker" #define D_UTC_TIME "UTC" #define D_UV_INDEX "UV-index" diff --git a/tasmota/language/pl_PL.h b/tasmota/language/pl_PL.h index e4f65d35a..81b2bf557 100644 --- a/tasmota/language/pl_PL.h +++ b/tasmota/language/pl_PL.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Hasło" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Port" #define D_POWER_FACTOR "Cosinus fi" #define D_POWERUSAGE "Moc" @@ -183,6 +184,7 @@ #define D_UPGRADE "aktualizacji" #define D_UPLOAD "Wgraj" #define D_UPTIME "Czas pracy" +#define D_USED "used" #define D_USER "Użytkownik" #define D_UTC_TIME "UTC" #define D_UV_INDEX "Indeks UV" diff --git a/tasmota/language/pt_BR.h b/tasmota/language/pt_BR.h index d689d83ce..866960151 100644 --- a/tasmota/language/pt_BR.h +++ b/tasmota/language/pt_BR.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Senha" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Porta" #define D_POWER_FACTOR "Fator de potência" #define D_POWERUSAGE "Potência" @@ -183,6 +184,7 @@ #define D_UPGRADE "atualização" #define D_UPLOAD "Enviar" #define D_UPTIME "Tempo de atividade" +#define D_USED "used" #define D_USER "Usuário" #define D_UTC_TIME "UTC" #define D_UV_INDEX "Índice UV" diff --git a/tasmota/language/pt_PT.h b/tasmota/language/pt_PT.h index 715904df4..6da2d62cb 100644 --- a/tasmota/language/pt_PT.h +++ b/tasmota/language/pt_PT.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Palavra Chave" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Porta" #define D_POWER_FACTOR "Factor de Potência" #define D_POWERUSAGE "Potência" @@ -183,6 +184,7 @@ #define D_UPGRADE "Atualizar" #define D_UPLOAD "Enviar" #define D_UPTIME "Tempo de Atividade" +#define D_USED "used" #define D_USER "Utilizador" #define D_UTC_TIME "UTC" #define D_UV_INDEX "Indíce UV" diff --git a/tasmota/language/ro_RO.h b/tasmota/language/ro_RO.h index a57b8bade..4cfa25cb6 100644 --- a/tasmota/language/ro_RO.h +++ b/tasmota/language/ro_RO.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Parolă" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Port" #define D_POWER_FACTOR "Factor de Putere" #define D_POWERUSAGE "Putere" @@ -183,6 +184,7 @@ #define D_UPGRADE "actualizare" #define D_UPLOAD "Încărcăre" #define D_UPTIME "Folosință" +#define D_USED "used" #define D_USER "Utilizator" #define D_UTC_TIME "UTC" #define D_UV_INDEX "Index UV" diff --git a/tasmota/language/ru_RU.h b/tasmota/language/ru_RU.h index ea148c878..fc83143b0 100644 --- a/tasmota/language/ru_RU.h +++ b/tasmota/language/ru_RU.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Пароль" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Порт" #define D_POWER_FACTOR "Коэффициент мощности" #define D_POWERUSAGE "Мощность" @@ -183,6 +184,7 @@ #define D_UPGRADE "обновление" #define D_UPLOAD "Загрузить" #define D_UPTIME "Uptime" +#define D_USED "used" #define D_USER "Пользователь" #define D_UTC_TIME "UTC" #define D_UV_INDEX "UV Index" diff --git a/tasmota/language/sk_SK.h b/tasmota/language/sk_SK.h index e0626e909..840edb230 100644 --- a/tasmota/language/sk_SK.h +++ b/tasmota/language/sk_SK.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Heslo" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Port" #define D_POWER_FACTOR "Účinník" #define D_POWERUSAGE "Príkon" @@ -183,6 +184,7 @@ #define D_UPGRADE "aktualizáciu" #define D_UPLOAD "Nahrávanie..." #define D_UPTIME "Uptime" +#define D_USED "used" #define D_USER "Používateľ" #define D_UTC_TIME "UTC" #define D_UV_INDEX "UV Index" diff --git a/tasmota/language/sv_SE.h b/tasmota/language/sv_SE.h index 38ef28862..1a3b7c6fd 100644 --- a/tasmota/language/sv_SE.h +++ b/tasmota/language/sv_SE.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Lösenord" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Port" #define D_POWER_FACTOR "Spänningsfaktor" #define D_POWERUSAGE "Spänning" @@ -183,6 +184,7 @@ #define D_UPGRADE "uppgradera" #define D_UPLOAD "Ladda upp" #define D_UPTIME "Upptid" +#define D_USED "used" #define D_USER "Användare" #define D_UTC_TIME "UTC" #define D_UV_INDEX "UV Index" diff --git a/tasmota/language/tr_TR.h b/tasmota/language/tr_TR.h index b6005ade9..a2c341ee6 100644 --- a/tasmota/language/tr_TR.h +++ b/tasmota/language/tr_TR.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Şifre" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Port" #define D_POWER_FACTOR "Güç Faktörü" #define D_POWERUSAGE "Güç" @@ -183,6 +184,7 @@ #define D_UPGRADE "yükseltme" #define D_UPLOAD "Yükleme" #define D_UPTIME "Açık Kalma Süresi" +#define D_USED "used" #define D_USER "Kullanıcı" #define D_UTC_TIME "UTC" #define D_UV_INDEX "UV Indeksi" diff --git a/tasmota/language/uk_UA.h b/tasmota/language/uk_UA.h index 756e61b44..c93062ef7 100644 --- a/tasmota/language/uk_UA.h +++ b/tasmota/language/uk_UA.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Гасло" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Порт" #define D_POWER_FACTOR "Коефіцієнт потужності" #define D_POWERUSAGE "Потужність" @@ -183,6 +184,7 @@ #define D_UPGRADE "оновлення" #define D_UPLOAD "Завантажити" #define D_UPTIME "Час роботи" +#define D_USED "used" #define D_USER "Користувач" #define D_UTC_TIME "UTC" #define D_UV_INDEX "Індекс УФ" diff --git a/tasmota/language/vi_VN.h b/tasmota/language/vi_VN.h index 3fdb716bd..44d92507b 100644 --- a/tasmota/language/vi_VN.h +++ b/tasmota/language/vi_VN.h @@ -140,6 +140,7 @@ #define D_PASSWORD "Mật khẩu" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "Cổng" #define D_POWER_FACTOR "Hệ số công suất" #define D_POWERUSAGE "Công suất" @@ -183,6 +184,7 @@ #define D_UPGRADE "nâng cấp" #define D_UPLOAD "Tải lên" #define D_UPTIME "Thời gian chạy" +#define D_USED "used" #define D_USER "Người dùng" #define D_UTC_TIME "UTC" #define D_UV_INDEX "UV Index" diff --git a/tasmota/language/zh_CN.h b/tasmota/language/zh_CN.h index a2437a739..cde32877e 100644 --- a/tasmota/language/zh_CN.h +++ b/tasmota/language/zh_CN.h @@ -140,6 +140,7 @@ #define D_PASSWORD "密码" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "端口" #define D_POWER_FACTOR "功率因数" #define D_POWERUSAGE "功率" @@ -183,6 +184,7 @@ #define D_UPGRADE "升级" #define D_UPLOAD "上传" #define D_UPTIME "运行时间" +#define D_USED "used" #define D_USER "用户名" #define D_UTC_TIME "UTC" #define D_UV_INDEX "紫外线指数" diff --git a/tasmota/language/zh_TW.h b/tasmota/language/zh_TW.h index 205162560..95639cc38 100644 --- a/tasmota/language/zh_TW.h +++ b/tasmota/language/zh_TW.h @@ -140,6 +140,7 @@ #define D_PASSWORD "密碼" #define D_PH "pH" #define D_MQ "MQ" +#define D_PARTITION "Partition" // As in flash and firmware partition #define D_PORT "通訊埠" #define D_POWER_FACTOR "功率因數" #define D_POWERUSAGE "用電量" @@ -183,6 +184,7 @@ #define D_UPGRADE "升級" #define D_UPLOAD "上傳" #define D_UPTIME "啟動時間" +#define D_USED "used" #define D_USER "使用者名稱" #define D_UTC_TIME "世界協調時間(UTC)" #define D_UV_INDEX "紫外線指數" diff --git a/tasmota/support_esp.ino b/tasmota/support_esp.ino index 65a9b01c9..ef53ee7d2 100644 --- a/tasmota/support_esp.ino +++ b/tasmota/support_esp.ino @@ -319,6 +319,34 @@ extern "C" { #include "rom/spi_flash.h" #endif +/* +void EspDumpPartitionTable(void) { + esp_partition_iterator_t it = esp_partition_find(ESP_PARTITION_TYPE_ANY, ESP_PARTITION_SUBTYPE_ANY, NULL); + uint32_t count = 0; + for (; it != NULL; it = esp_partition_next(it)) { + ++count; + const esp_partition_t *partition = esp_partition_get(it); + AddLog(LOG_LEVEL_DEBUG, PSTR("Partition #%d, name %s, type %d, subtype %d, size %d"), count, partition->label, partition->type, partition->subtype, partition->size); + } + esp_partition_iterator_release(it); +} +*/ + +uint32_t EspProgramSize(const char *label) { + const esp_partition_t *part = esp_partition_find_first(ESP_PARTITION_TYPE_APP, ESP_PARTITION_SUBTYPE_ANY, label); + if (!part) { + return 0; + } + const esp_partition_pos_t part_pos = { + .offset = part->address, + .size = part->size, + }; + esp_image_metadata_t data; + data.start_addr = part_pos.offset; + esp_image_verify(ESP_IMAGE_VERIFY, &part_pos, &data); + return data.image_len; +} + bool EspSingleOtaPartition(void) { return (1 == esp_ota_get_app_partition_count()); } diff --git a/tasmota/xdrv_01_webserver.ino b/tasmota/xdrv_01_webserver.ino index ebd73199c..fa7ba8ac8 100644 --- a/tasmota/xdrv_01_webserver.ino +++ b/tasmota/xdrv_01_webserver.ino @@ -2468,6 +2468,22 @@ void HandleInformation(void) WSContentSend_P(PSTR("}1" D_PSR_MAX_MEMORY "}2%d kB"), ESP.getPsramSize() / 1024); WSContentSend_P(PSTR("}1" D_PSR_FREE_MEMORY "}2%d kB"), ESP.getFreePsram() / 1024); } + WSContentSend_P(PSTR("}1}2 ")); // Empty line + esp_partition_iterator_t it = esp_partition_find(ESP_PARTITION_TYPE_ANY, ESP_PARTITION_SUBTYPE_ANY, NULL); + for (; it != NULL; it = esp_partition_next(it)) { + const esp_partition_t *part = esp_partition_get(it); +// AddLog(LOG_LEVEL_DEBUG, PSTR("Partition type %d, subtype %d, name %s, size %d"), part->type, part->subtype, part->label, part->size); + uint32_t part_size = part->size / 1024; + if (0 == part->type) { // app + uint32_t prog_size = EspProgramSize(part->label); + uint32_t part_used = ((prog_size / 1024) * 100) / part_size; + WSContentSend_PD(PSTR("}1" D_PARTITION " %s}2%d kB (" D_USED " %d%%)"), part->label, part_size, part_used); + } + if ((1 == part->type) && (130 == part->subtype)) { // data and fs + WSContentSend_PD(PSTR("}1" D_PARTITION " fs}2%d kB"), part_size); + } + } + esp_partition_iterator_release(it); #else // ESP32 WSContentSend_PD(PSTR("}1" D_FREE_MEMORY "}2%1_f kB"), &freemem); #endif // ESP32