diff --git a/WiFiManager.cpp b/WiFiManager.cpp index e92c1ee..2cb5dd4 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -1408,6 +1408,7 @@ void WiFiManager::handleInfo() { F("cpufreq"), F("freeheap"), F("lastreset"), + // F("temp"), F("wifihead"), F("apip"), F("apmac"), @@ -1617,6 +1618,14 @@ String WiFiManager::getInfoData(String id){ p.replace(FPSTR(T_1),WiFi.getAutoConnect() ? FPSTR(S_enable) : FPSTR(S_disable)); } #endif + #ifdef ESP32 + else if(id==F("temp")){ + // temperature is not calibrated, varying large offsets are present, use for relative temp changes only + p = FPSTR(HTTP_INFO_temp); + p.replace(FPSTR(T_1),(String)temperatureRead()); + p.replace(FPSTR(T_2),(String)((temperatureRead()+32)*1.8)); + } + #endif return p; } diff --git a/strings_en.h b/strings_en.h index edbc84e..21f3f2b 100644 --- a/strings_en.h +++ b/strings_en.h @@ -166,6 +166,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°
"; // Strings const char S_y[] PROGMEM = "Yes";