Refine manage overlay: US/CAN state abbreviations, share-QR caption, and an escalating second menu with named-face labels
Build and push server image / build-and-push (push) Successful in 32s
Build and push server image / build-and-push (push) Successful in 32s
Two rounds of follow-up work on the manage-button overlay:
1. Location formatting: US/Canada now show abbreviated state/province
("CA", "ON") instead of the full name, other countries show the full
country name, and each is its own line (was one line, now wraps to
two) so longer international place names have more room without
threatening to overlap the top-right QR box. The bottom-left share QR
also gets a "SCAN TO DOWNLOAD" caption.
2. Escalating menu: pressing the manage button again while its overlay
is already up adds a second level -- each Immich-identified person's
name labeled next to their face in the photo (using Immich's own
face recognition/People data, no detection/recognition added to this
project). A third press exits immediately instead of waiting out the
30s auto-revert timer. No new Immich API needed -- GET /api/faces
already embeds a nullable person.name per face; new
server/app/face_labels.py maps a named face's box into the final
800x480 frame's pixel space (reusing crop-box math extracted from
image_pipeline.py's face-aware cropping). Capped at 4 named faces,
sized to a real firmware RAM budget: each label is its own malloc'd
overlay region on the device, alongside the 4 fixed corner regions
already in use. New GET /frame/face-labels returns a flattened
fixed-slot JSON shape (not a real array) so firmware's existing
flat-scalar parser can read it without needing an actual array
parser. No persistent state needed for the escalation itself -- it's
all local control flow within one continuous awake session
(frame_client.c's run_management_menu()).
This commit is contained in:
+17
-7
@@ -48,13 +48,16 @@ algorithm itself -- it just streams the response straight to the panel.
|
||||
button (see `firmware/README.md`).
|
||||
- `GET /frame/config` -- `{"refresh_interval_s": ...}`, polled by the frame
|
||||
each wake alongside its reachability check
|
||||
- `GET /frame/photo-info` -- `{"asset_id": ..., "location": ... | null,
|
||||
"taken_at": ... | null}` for the current photo (same idempotent
|
||||
current-photo semantics as `/frame/image`). `location` is `city, state`
|
||||
(or `city, country`, or just `city`) if Immich reverse-geocoded the
|
||||
photo's GPS EXIF, else `null`; `taken_at` is `MM/DD/YY` from the
|
||||
photo's EXIF capture date, else `null`. Used by the device's manage
|
||||
button to build its overlay text
|
||||
- `GET /frame/photo-info` -- `{"asset_id": ..., "location_line1": ... |
|
||||
null, "location_line2": ... | null, "taken_at": ... | null}` for the
|
||||
current photo (same idempotent current-photo semantics as
|
||||
`/frame/image`). `location_line1`/`location_line2` are `city` /
|
||||
`state-or-country` if Immich reverse-geocoded the photo's GPS EXIF
|
||||
(both `null` if not) -- for US/Canada, the region line is the
|
||||
abbreviated state/province (`"CA"`, `"ON"`); elsewhere it's the full
|
||||
country name. `taken_at` is `MM/DD/YY` from the photo's EXIF capture
|
||||
date, else `null`. Used by the device's manage button to build its
|
||||
overlay text
|
||||
- `GET /frame/share/{asset_id}` -- creates a 30-minute public, view-only
|
||||
Immich share link for `asset_id` and redirects (302) to it. Only works
|
||||
for the photo currently showing or in the upcoming queue on this frame
|
||||
@@ -62,6 +65,13 @@ algorithm itself -- it just streams the response straight to the panel.
|
||||
(i.e. when someone actually scans the manage overlay's share QR), not
|
||||
when the button's pressed, so the 30-minute window starts when it's
|
||||
actually used
|
||||
- `GET /frame/face-labels` -- `{"count": N, "name_0": ..., "x_0": ...,
|
||||
"y_0": ..., ...}` (up to 4 slots) -- named people from Immich's face
|
||||
recognition, positioned in final 800x480 frame pixel space. Only faces
|
||||
Immich already has an identified name for are included (no face
|
||||
detection/recognition happens in this project, see
|
||||
`app/face_labels.py`); `count: 0` if none are named. Used by the
|
||||
device manage button's escalated second menu level
|
||||
- `GET /api/queue` -- `{"current": {...} | null, "upcoming": [...]}`, each
|
||||
entry an asset id + thumbnail URL; used by the config UI
|
||||
- `POST /api/queue/reorder` -- reorders the upcoming queue; body is
|
||||
|
||||
Reference in New Issue
Block a user