From b22d05901dee4000ee012af470ddf898579257ae Mon Sep 17 00:00:00 2001 From: Luke Hoersten Date: Sun, 14 Jun 2026 11:39:08 -0500 Subject: Identity screen: name + hostname + IP + state, auto-scaled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit local_screens_show_ip() now renders four lines instead of two — all the device's runtime identity at once: line 1: viewport name ("mudroom" / "viewport" if unconfigured) line 2: mDNS hostname ("viewport-mudroom.local" / "viewport.local") line 3: IP ("192.168.1.42" / "no network") line 4: state ("awake" / "asleep" / "unconfigured") Same screen is shown on first boot, after factory reset, and as a 15s BOOT short-press overlay — operator always has the device's full identity one button-press away (find it on the LAN, confirm name + configuration without curling). Font scale is auto-picked: the largest integer scale (1×–6×) where the longest line fits within 90% of width AND all four lines plus inter-line spacing fit within 90% of height. Works for both portrait (480×800) and landscape (800×480) without separate code paths. Font expanded to cover the new strings: - All lowercase a–z (added b, f, h, j, k, m, q, s, u, x, y, z). - Punctuation: dash, slash (digits, period, colon already covered). Fallback policy unchanged: unsupported chars render as blank, which keeps the table tight and the failure mode visible rather than crashing. README "Local rendering" + TESTING.md M8 updated to describe the four-line identity layout and show both the unconfigured-boot and configured-overlay example outputs. Build verified clean against ESP-IDF 5.4 (binary ~873 KB, +1.6 KB for the expanded font). --- main/local_screens.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'main/local_screens.h') diff --git a/main/local_screens.h b/main/local_screens.h index 20b2b36..ffe9a3d 100644 --- a/main/local_screens.h +++ b/main/local_screens.h @@ -7,10 +7,13 @@ // bitmap font. esp_err_t local_screens_init(void); -// Render the unconfigured / identify screen — two centered lines: -// "viewport.local" -// -// Shown on first boot, after factory reset, and as a BOOT-button overlay. +// Render the identity / "who am I" screen — four centered lines: +// ("viewport" if unconfigured) +// viewport-.local (mDNS hostname) +// ("no network" if no DHCP lease) +// ("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 BOOT-button overlay. esp_err_t local_screens_show_ip(void); // Render the loading screen — centered "Loading…" — shown on every wake -- cgit v1.2.3