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()).
33 lines
1.2 KiB
C
33 lines
1.2 KiB
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
|
|
/**
|
|
* Configures the "manage" button GPIO (CONFIG_FRAME_MANAGE_BUTTON_GPIO,
|
|
* active-low with internal pull-up) and arms it as a deep-sleep wakeup
|
|
* source, same as reset_button_init()/next_button_init(). Call once,
|
|
* early in app_main(), before the device might enter deep sleep.
|
|
*
|
|
* A no-op if CONFIG_FRAME_MANAGE_BUTTON_GPIO is negative (button disabled).
|
|
*/
|
|
void manage_button_init(void);
|
|
|
|
/**
|
|
* Returns whether the manage button is currently held, debounced with a
|
|
* couple of short re-checks to reject noise. Like the next-photo button,
|
|
* there's no long hold-to-confirm gate -- showing the management QR is
|
|
* low-stakes and should feel immediate.
|
|
*/
|
|
bool manage_button_check(void);
|
|
|
|
/**
|
|
* Bare, undebounced "is the pin low right now" read -- unlike
|
|
* manage_button_check(), this doesn't consult the latched deep-sleep
|
|
* wakeup status (only meaningful once, immediately after waking from
|
|
* sleep) and isn't meant to detect what woke the device. Used for
|
|
* polling for a subsequent press while already awake and the manage
|
|
* overlay is up (see frame_client.c's wait_for_button_press()), which
|
|
* does its own debounce/release-wait around repeated calls to this.
|
|
*/
|
|
bool manage_button_is_pressed(void);
|