src.nth.io/

summaryrefslogtreecommitdiff
path: root/main/local_screens.h
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2026-06-14 17:37:51 -0500
committerLuke Hoersten <[email protected]>2026-06-14 17:37:51 -0500
commitcbc4904aa35191f59aff93df5ed36f09f4cfa943 (patch)
treeae854449c6665d1de2b418ec9bb10821b6ab5cef /main/local_screens.h
parent18ddde394832beb812181003016ff73498ac72a3 (diff)
Info screen: full /config + /state dump, replaces identity screen
Previously the 4-line "identity" screen showed only viewport name, mDNS host, IP, and state. Expanded to 15 lines covering the full GET /config + GET /state output (name, host, ip, state, configured, scrypted, orientation, brightness, idle, fw, uptime, frames, errs, free heap, free PSRAM), label/value pairs left-aligned with auto-scaled font. Renames "identity" → "info" throughout — symbol, log messages, README/TESTING references. Also: - Move the info-screen render's big locals (~1.6 KiB: lines[16][80] + scrypt[256] + vp_name[64]) to BSS. The touch task's 3 KiB stack was overflowing on every long-press, leaving whatever frame was previously on the panel — gave the appearance of a "blue screen" after the M5 test pattern. - Drop the ≥5 s touch factory-reset gesture and remove all stale references to it in docs and comments. NVS wipe is now a USB-side `idf.py erase-flash` operation only. - M5 follow-up TODO in jpeg_decoder.c: solid green renders ~black and solid blue renders green; not a byte-order issue (BGR setting turns red into blue). Tracked as a known M5 gap.
Diffstat (limited to 'main/local_screens.h')
-rw-r--r--main/local_screens.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/main/local_screens.h b/main/local_screens.h
index e2d6ca1..8f8e18b 100644
--- a/main/local_screens.h
+++ b/main/local_screens.h
@@ -9,26 +9,23 @@
// bitmap font.
esp_err_t local_screens_init(void);
-// Render the identity / "who am I" screen — four centered lines:
-// <viewport name> ("viewport" if unconfigured)
-// viewport-<name>.local (mDNS hostname)
-// <current IP> ("no network" if no DHCP lease)
-// <state> ("awake" / "asleep" / "unconfigured")
-// Font scale is auto-picked to fit the longest line within 90% of width.
-// Shown on first boot, after factory reset, and as a 15s touch-long-press overlay.
-esp_err_t local_screens_show_ip(void);
+// Render the info screen — a multi-line dump of the full GET /config and
+// GET /state output, formatted as label/value pairs. Long values (e.g. the
+// scrypted URL) are truncated to fit. Font scale is auto-picked.
+// Shown on first boot and as a 15s touch-long-press overlay
+// (`local_screens_overlay`).
+esp_err_t local_screens_show_info(void);
// Render the loading screen — centered "Loading…" — shown on every wake
// until the next /frame arrives.
esp_err_t local_screens_show_loading(void);
-// Show the identity ("who am I") screen for `duration_ms`, then drop the
-// backlight off. Triggered by a ≥1.5s touch long-press in any state.
+// Show the info screen for `duration_ms`, then drop the backlight off.
+// Triggered by a ≥1.5s touch long-press in any state.
esp_err_t local_screens_overlay(uint32_t duration_ms);
-// True while the identity overlay is currently shown (timer armed).
-// Used by the touch handler to make a second tap dismiss the overlay
-// instead of re-arming it.
+// True while the info overlay is currently shown (timer armed). Used by
+// the touch handler to make a tap dismiss the overlay instead of toggling.
bool local_screens_overlay_active(void);
// Dismiss the overlay now: cancel the timer and drop the backlight.