mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-04 02:48:13 +10:00
adds esp32 core temp, not enabled
the core temp sensors are not calibrated in production atm, they are large offsets form chip to chip and are useful for relative temp swings only. Until the IDF comes up with a new temp sense, this is commented out.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -166,6 +166,7 @@ const char HTTP_INFO_host[] PROGMEM = "<dt>Hostname</dt><dd>{1}</dd>";
|
||||
const char HTTP_INFO_stamac[] PROGMEM = "<dt>Station MAC</dt><dd>{1}</dd>";
|
||||
const char HTTP_INFO_conx[] PROGMEM = "<dt>Connected</dt><dd>{1}</dd>";
|
||||
const char HTTP_INFO_autoconx[] PROGMEM = "<dt>Autoconnect</dt><dd>{1}</dd>";
|
||||
const char HTTP_INFO_temp[] PROGMEM = "<dt>Temperature</dt><dd>{1} C° / {2} F°</dd>";
|
||||
|
||||
// Strings
|
||||
const char S_y[] PROGMEM = "Yes";
|
||||
|
||||
Reference in New Issue
Block a user