Wire the real fetch -> display -> deep-sleep cycle

frame_client_run() now does what it was always meant to: probe the tools
server, GET /frame/image and stream the response straight into the panel
via epd_display_stream() (esp_http_client's manual open/fetch_headers/read
API pulls in exactly the shape epd_display_stream()'s read_fn expects, so
the ~192KB frame never sits in RAM at once), then epd_sleep() and
esp_deep_sleep_start() for an hour.

Skips the WiFi/server status checklist screen on the happy path now that
there's a real photo to show instead -- three full refreshes every single
hour (status-pending, status-final, photo) wasn't worth it once bring-up
was actually working. Still shows it (status FAILED) when the server
isn't reachable, since nothing's been drawn yet that cycle and it's the
cheapest useful diagnostic. A mid-fetch failure after the panel's already
started refreshing just logs and retries sooner, rather than compounding
with a second refresh.

New Kconfig knobs: FRAME_FETCH_TIMEOUT_MS, FRAME_SLEEP_INTERVAL_S
(default 3600s), FRAME_RETRY_INTERVAL_S (default 300s on failure).
This commit is contained in:
2026-07-18 14:48:21 -04:00
parent 1c1d9c6767
commit 1ff91c8a71
2 changed files with 108 additions and 16 deletions
+25
View File
@@ -51,4 +51,29 @@ menu "ESPresso Frame Configuration"
How long to wait for an HTTP response from the tools server
when checking reachability on the post-connect status screen.
config FRAME_FETCH_TIMEOUT_MS
int "Image fetch HTTP timeout (ms)"
default 15000
help
How long to wait on the GET /frame/image request before giving
up. The server does real work per request (Immich download +
resize + dither), so this is longer than the reachability
check's timeout.
config FRAME_SLEEP_INTERVAL_S
int "Deep sleep interval between refreshes (seconds)"
default 3600
help
How long the device deep-sleeps between successful
fetch-and-display cycles. Lower this for bench testing so you
don't have to wait an hour per iteration.
config FRAME_RETRY_INTERVAL_S
int "Deep sleep interval after a failed cycle (seconds)"
default 300
help
How long the device deep-sleeps before retrying after the
server was unreachable or the fetch/display failed, instead of
waiting the full FRAME_SLEEP_INTERVAL_S.
endmenu