From f59cea3be9eed8d63fa44d4fd360c9c68e9318f6 Mon Sep 17 00:00:00 2001 From: Luke Hoersten Date: Wed, 15 Jul 2026 19:18:32 -0500 Subject: temp: report on-die temperature in /state and the info screen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New chip_temp module wraps the ESP32-P4 TSENS driver (20-100C range for best accuracy in the warm band a PoE + 200MHz-PSRAM device lives in). /state gains temp_c (0.1C resolution, omitted when the sensor is unavailable); the long-press info overlay gains a temp line (lowercase c suffix — the local 8x8 font has no uppercase C). Junction temperature, ~10-20C above ambient under load. --- main/local_screens.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'main/local_screens.c') diff --git a/main/local_screens.c b/main/local_screens.c index 5c72f26..751ac91 100644 --- a/main/local_screens.c +++ b/main/local_screens.c @@ -1,11 +1,13 @@ #include "local_screens.h" +#include #include #include "esp_heap_caps.h" #include "esp_log.h" #include "esp_timer.h" +#include "chip_temp.h" #include "display.h" #include "net_eth.h" #include "viewport_state.h" @@ -310,6 +312,8 @@ esp_err_t local_screens_show_info(void) ADD("errs %llu", (unsigned long long)(decode_err + post_err)); ADD("heap %s", heap_str); ADD("psram %s", psram_str); + float temp_c = chip_temp_read(); // on-die junction temp; skip if n/a + if (!isnan(temp_c)) ADD("temp %.1fc", (double)temp_c); #undef ADD -- cgit v1.2.3