diff options
| author | Luke Hoersten <[email protected]> | 2026-06-14 11:39:08 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2026-06-14 11:39:08 -0500 |
| commit | b22d05901dee4000ee012af470ddf898579257ae (patch) | |
| tree | aa8505b1c0f073d0ac4cd2d53d7fe8b37703b100 /main/local_screens.h | |
| parent | b7cf2f533749a577cc801ddf317691995d0bd23f (diff) | |
Identity screen: name + hostname + IP + state, auto-scaled
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).
Diffstat (limited to 'main/local_screens.h')
| -rw-r--r-- | main/local_screens.h | 11 |
1 files changed, 7 insertions, 4 deletions
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" -// <current IP> -// Shown on first boot, after factory reset, and as a BOOT-button overlay. +// 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 BOOT-button overlay. esp_err_t local_screens_show_ip(void); // Render the loading screen — centered "Loading…" — shown on every wake |
