diff --git a/WiFiManager.cpp b/WiFiManager.cpp index df3a98a..240ef59 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -1833,18 +1833,21 @@ void WiFiManager::handleInfo() { }; #elif defined(ESP32) - infos = 22; + // add esp_chip_info ? + infos = 25; String infoids[] = { F("esphead"), F("uptime"), F("chipid"), F("chiprev"), F("idesize"), + F("flashsize"), F("sdkver"), F("cpufreq"), F("freeheap"), + F("memsketch"), + F("memsmeter"), F("lastreset"), - // F("temp"), F("wifihead"), F("apip"), F("apmac"), @@ -1857,7 +1860,8 @@ void WiFiManager::handleInfo() { F("dnss"), F("host"), F("stamac"), - F("conx") + F("conx"), + // F("temp") }; #endif @@ -1924,12 +1928,16 @@ String WiFiManager::getInfoData(String id){ #ifdef ESP8266 p = FPSTR(HTTP_INFO_flashsize); p.replace(FPSTR(T_1),(String)ESP.getFlashChipRealSize()); + #elif defined ESP32 + p = FPSTR(HTTP_INFO_psrsize); + p.replace(FPSTR(T_1),(String)ESP.getPsramSize()); #endif } else if(id==F("sdkver")){ p = FPSTR(HTTP_INFO_sdkver); #ifdef ESP32 p.replace(FPSTR(T_1),(String)esp_get_idf_version()); + // p.replace(FPSTR(T_1),(String)system_get_sdk_version()); // deprecated #else p.replace(FPSTR(T_1),(String)system_get_sdk_version()); #endif @@ -1954,20 +1962,16 @@ String WiFiManager::getInfoData(String id){ p = FPSTR(HTTP_INFO_freeheap); p.replace(FPSTR(T_1),(String)ESP.getFreeHeap()); } - #ifdef ESP8266 else if(id==F("memsketch")){ p = FPSTR(HTTP_INFO_memsketch); p.replace(FPSTR(T_1),(String)(ESP.getSketchSize())); p.replace(FPSTR(T_2),(String)(ESP.getSketchSize()+ESP.getFreeSketchSpace())); } - #endif - #ifdef ESP8266 else if(id==F("memsmeter")){ p = FPSTR(HTTP_INFO_memsmeter); p.replace(FPSTR(T_1),(String)(ESP.getSketchSize())); p.replace(FPSTR(T_2),(String)(ESP.getSketchSize()+ESP.getFreeSketchSpace())); } - #endif else if(id==F("lastreset")){ #ifdef ESP8266 p = FPSTR(HTTP_INFO_lastreset); @@ -2067,6 +2071,7 @@ String WiFiManager::getInfoData(String id){ p = FPSTR(HTTP_INFO_temp); p.replace(FPSTR(T_1),(String)temperatureRead()); p.replace(FPSTR(T_2),(String)((temperatureRead()+32)*1.8)); + p.replace(FPSTR(T_3),(String)hallRead()); } #endif return p; diff --git a/strings_en.h b/strings_en.h index e15c9b6..4699001 100644 --- a/strings_en.h +++ b/strings_en.h @@ -162,17 +162,18 @@ const char HTTP_JS[] PROGMEM = const char HTTP_INFO_chiprev[] PROGMEM = "
Chip Rev
{1}
"; const char HTTP_INFO_lastreset[] PROGMEM = "
Last reset reason
CPU0: {1}
CPU1: {2}
"; const char HTTP_INFO_aphost[] PROGMEM = "
Acccess Point Hostname
{1}
"; -#else + const char HTTP_INFO_psrsize[] PROGMEM = "
PSRAM Size
{1} bytes
"; +#else const char HTTP_INFO_esphead[] PROGMEM = "

esp8266


"; - const char HTTP_INFO_flashsize[] PROGMEM = "
Real Flash Size
{1} bytes
"; const char HTTP_INFO_fchipid[] PROGMEM = "
Flash Chip ID
{1}
"; const char HTTP_INFO_corever[] PROGMEM = "
Core Version
{1}
"; const char HTTP_INFO_bootver[] PROGMEM = "
Boot Version
{1}
"; - const char HTTP_INFO_memsketch[] PROGMEM = "
Memory - Sketch Size
Used / Total bytes
{1} / {2}"; - const char HTTP_INFO_memsmeter[] PROGMEM = "
"; const char HTTP_INFO_lastreset[] PROGMEM = "
Last reset reason
{1}
"; + const char HTTP_INFO_flashsize[] PROGMEM = "
Real Flash Size
{1} bytes
"; #endif +const char HTTP_INFO_memsmeter[] PROGMEM = "
"; +const char HTTP_INFO_memsketch[] PROGMEM = "
Memory - Sketch Size
Used / Total bytes
{1} / {2}"; const char HTTP_INFO_freeheap[] PROGMEM = "
Memory - Free Heap
{1} bytes available
"; const char HTTP_INFO_wifihead[] PROGMEM = "

WiFi


"; const char HTTP_INFO_uptime[] PROGMEM = "
Uptime
{1} Mins {2} Secs
"; @@ -192,7 +193,7 @@ const char HTTP_INFO_host[] PROGMEM = "
Hostname
{1}
"; const char HTTP_INFO_stamac[] PROGMEM = "
Station MAC
{1}
"; const char HTTP_INFO_conx[] PROGMEM = "
Connected
{1}
"; const char HTTP_INFO_autoconx[] PROGMEM = "
Autoconnect
{1}
"; -const char HTTP_INFO_temp[] PROGMEM = "
Temperature
{1} C° / {2} F°
"; +const char HTTP_INFO_temp[] PROGMEM = "
Temperature
{1} C° / {2} F°
Hall
{3}
"; // Strings const char S_y[] PROGMEM = "Yes"; @@ -289,6 +290,7 @@ const char T_ss[] PROGMEM = "{"; // token start sentinel const char T_es[] PROGMEM = "}"; // token end sentinel const char T_1[] PROGMEM = "{1}"; // @token 1 const char T_2[] PROGMEM = "{2}"; // @token 2 +const char T_3[] PROGMEM = "{3}"; // @token 2 const char T_v[] PROGMEM = "{v}"; // @token v const char T_I[] PROGMEM = "{I}"; // @token I const char T_i[] PROGMEM = "{i}"; // @token i