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:
Shawn A
2018-09-12 13:19:53 -05:00
parent 9ce498c5b6
commit 4f0a87a0a5
2 changed files with 10 additions and 0 deletions
+9
View File
@@ -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;
}
+1
View File
@@ -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&deg; / {2} F&deg;</dd>";
// Strings
const char S_y[] PROGMEM = "Yes";