| name | preview |
| description | Render and view the HelmLog e-paper display frame from your Mac without the device, and iterate the layout. TRIGGER when the user wants to see what the panel shows/will show, preview a display change, or tweak the instrument layout ("what does the display look like", "preview the screen", "change the layout", "make the labels bigger"). DO NOT trigger for flashing the device (that's `/flash`) or firmware transport/WiFi issues. |
/preview — see and shape what the panel shows
The display is rendered server-side in HelmLog, so you preview and change it
without touching this firmware or the device. The device just blits whatever
HelmLog returns.
See the current frame (no device needed)
If your Mac and the Pi are both on Tailscale (or you're on the boat LAN):
KEY=<device-api-key>
HOST=<pi-host>:3002
curl -s -H "Authorization: Bearer $KEY" \
"http://$HOST/api/display.png" -o preview.png && open preview.png
/api/display.png — human-viewable render (open in a browser you're logged
into HelmLog and the session cookie authenticates — no key needed).
/api/display.raw — the byte-identical 4-bit frame the device blits.
- Append
?invert=1 to preview inverted polarity.
Change the layout
The renderer lives in HelmLog, not here:
helmlog/src/helmlog/display_render.py — the 960×540 Pillow layout (cells,
fonts, values, VMG = STW·cos(TWA), LIVE/NO DATA badge). Iterate by editing
it and re-running the PNG preview above; there are tests in
helmlog/tests/test_display.py.
helmlog/src/helmlog/routes/display.py — the .png / .raw endpoints and
the X-Refresh-Seconds / X-Full-Refresh-Seconds headers.
Follow HelmLog's own AGENTS.md (worktree + PR + Closes #N) when editing it.
A render change only reaches the device after HelmLog is redeployed to the
Pi; the device then picks it up automatically on the next poll — no reflash.
e-paper legibility notes
- Mid-grey renders faint on this panel — keep text black (labels were darkened
for exactly this reason).
- The render is landscape 960×540; the device is mounted landscape to match.
- Each update flashes the panel, so prefer a calm refresh
(
DISPLAY_REFRESH_SECONDS ~20–30 in HelmLog settings) over 5 s.