From 09d71f7121c115d60867dc8e04730347fc650729 Mon Sep 17 00:00:00 2001 From: Shivang Chikani Date: Sun, 1 Nov 2026 20:17:45 +0530 Subject: [PATCH] Docs: the chip's temperature in System Monitor api/sysinfo.md: the optional chip_temp() member, how the ESP-IDF app fills it (the built-in sensor on the ESP32-S3 and ESP32-C6, none on the classic ESP32) and what uses it; api/apps.md and guide/using.md: System Monitor shows it. Changelog: an Unreleased entry. --- site/api/apps.md | 2 +- site/api/sysinfo.md | 3 +++ site/changelog.md | 8 ++++++++ site/guide/using.md | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/site/api/apps.md b/site/api/apps.md index 53a4acf..a73069a 100644 --- a/site/api/apps.md +++ b/site/api/apps.md @@ -74,7 +74,7 @@ void weather_register(void) { td_app_register(&s_app); } | Network | `((` | `apps/network.c` | Wi-Fi and Ethernet status, Wi-Fi scan / connect / forget, the Telnet remote-desktop switch and the SSH/SFTP and FTP servers, through `td_sysinfo()->net`. | | MQTT | `MQ` | `apps/mqtt.c` | Connects to a broker, subscribes, publishes and lists messages; shares the connection with the `mqtt` shell command ([mqtt.md](mqtt.md)). | | Modbus | `MB` | `apps/modbus.c` | Reads and writes coils and registers over Modbus TCP or RTU, optionally repeated, and switches the Modbus TCP server ([modbus.md](modbus.md)). | -| System Monitor | `▄█` | `apps/sysmon.c` | Live heap and PSRAM bars, task count, CPU clock, uptime and tinydesk's own frame and link statistics. | +| System Monitor | `▄█` | `apps/sysmon.c` | Live heap and PSRAM bars, task count, CPU clock, the chip's temperature (where the port sets `chip_temp`), uptime and tinydesk's own frame and link statistics. | | Task Manager | `▐▌` | `apps/taskmgr.c` | Lists the open windows (switch to one, end it) and, where the port can list them, the system tasks with state, priority, core, CPU share and free stack. | | Log Viewer | `≡≡` | `apps/logview.c` | Shows the log ring buffer filled by `td_log_append()` with level colours. | | Settings | `☼ ` | `apps/settings.c` | Theme, ASCII / UTF-8 mode, desktop pattern and icons, icon / start menu / taskbar sizes; saved per user. | diff --git a/site/api/sysinfo.md b/site/api/sysinfo.md index 1f37ef9..f72d1dd 100644 --- a/site/api/sysinfo.md +++ b/site/api/sysinfo.md @@ -52,6 +52,7 @@ typedef struct { uint32_t (*psram_total)(void); int (*task_count)(void); int (*cpu_mhz)(void); + bool (*chip_temp)(int *tenths_c); int (*tasks)(td_task_info_t *out, int max); bool (*time_now)(int64_t *utc); @@ -91,6 +92,7 @@ typedef struct { | `psram_free`, `psram_total` | `MALLOC_CAP_SPIRAM` (0 on the C6, which has none) | not set | | `task_count` | `uxTaskGetNumberOfTasks()` | not set | | `cpu_mhz` | `CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ` | not set | +| `chip_temp` | the built-in temperature sensor (`temperature_sensor_*`), on the ESP32-S3 and ESP32-C6; not set on the classic ESP32, which has none | not set | | `tasks` | `uxTaskGetSystemState()`, only when FreeRTOS trace facility and run-time stats are enabled | not set | | `time_now` | `time()`, false before it is set | `time()` | | `time_set` | `settimeofday()` | not set | @@ -173,6 +175,7 @@ not a licence notice: licence texts stay in the port's repository. | `psram_free`, `psram_total` | About, System Monitor, Task Manager | External RAM (PSRAM) on the heap. Leave `psram_total` `NULL` or return 0 when there is none. When `psram_total()` returns non-zero, `psram_free` must be set too: the apps call it without checking. | | `task_count` | System Monitor | Number of tasks or threads. | | `cpu_mhz` | System Monitor, Task Manager | CPU clock. | +| `chip_temp` | System Monitor | The chip's own temperature (its die, not the room) in tenths of a degree Celsius; return false when it cannot be read. | | `tasks` | Task Manager | Fill up to `max` entries of `out` and return how many. See below. | With external RAM (`psram_total` non-zero), the three heap figures must cover internal RAM only. It is the scarce part (task stacks, DMA buffers, the SSH server's start check), and the apps show internal RAM and PSRAM separately. diff --git a/site/changelog.md b/site/changelog.md index a1c7f76..9c8de4e 100644 --- a/site/changelog.md +++ b/site/changelog.md @@ -7,6 +7,14 @@ that reaches users or changes an API (see [Maintaining these docs](maintaining.m Versions follow [Semantic Versioning](https://semver.org/): until 1.0.0 the API may still change between minor versions. +## Unreleased + +* **The chip's temperature in System Monitor:** on the ESP32-S3 and the + ESP32-C6, the CPU line also shows the chip's own temperature from its + built-in sensor (for example `Chip: 47.3 °C`). The classic ESP32 has no + such sensor. Ports provide it through the new optional `chip_temp` in + `td_sysinfo_t`. + ## 0.2.0 (2026-10-31) * **Python scripts with MicroPython:** the new shell command `py` runs a diff --git a/site/guide/using.md b/site/guide/using.md index 8e74e29..1d599fb 100644 --- a/site/guide/using.md +++ b/site/guide/using.md @@ -155,7 +155,7 @@ not); **Stop** in the menu and Ctrl+C in the pane work everywhere. | Network | Wi-Fi scan/connect/forget, Ethernet status, SSH/FTP servers, Telnet switch | | MQTT | connect (config file or URL, TLS), subscribe, publish, message log | | Modbus | read/write coils and registers over TCP or RTU, repeat at an interval, built-in TCP server | -| System Monitor | RAM (internal and PSRAM), tasks, CPU, frame time, serial traffic, screen size | +| System Monitor | RAM (internal and PSRAM), tasks, CPU and, on the ESP32-S3 and ESP32-C6, the chip's temperature, frame time, serial traffic, screen size | | Task Manager | open windows (switch to / end) and system tasks with CPU %, state, stack | | Log Viewer | the system log (root) | | Settings | theme (Dark by default, or Classic), ASCII mode, icons, sizes, desktop pattern (light shade by default), links to Network / Date & time / Software update |