src.nth.io/

summaryrefslogtreecommitdiff
path: root/main/app_main.c
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2026-07-15 19:18:32 -0500
committerLuke Hoersten <[email protected]>2026-07-15 19:18:32 -0500
commitf59cea3be9eed8d63fa44d4fd360c9c68e9318f6 (patch)
tree699a0b554d04600520505c9e5bf835f89663af9f /main/app_main.c
parent659da7f36473a21494693f031a39fb6bb977b90a (diff)
temp: report on-die temperature in /state and the info screen
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.
Diffstat (limited to 'main/app_main.c')
-rw-r--r--main/app_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main/app_main.c b/main/app_main.c
index fa63e26..f1aae13 100644
--- a/main/app_main.c
+++ b/main/app_main.c
@@ -1,3 +1,4 @@
+#include "chip_temp.h"
#include "display.h"
#include "http_api.h"
#include "jpeg_decoder.h"
@@ -42,6 +43,7 @@ void app_main(void)
viewport_state_init();
nvs_config_load(); // apply persisted config over defaults (best-effort)
+ chip_temp_init(); // best-effort; readers get NAN if unavailable
// PROJECT_VER comes from CMakeLists.txt — git short hash + dirty
// marker. Logged in the very first line so any captured boot log
// tells us exactly which build is running.