Add third button: "scan to manage" QR overlay on the current photo

Pressing the manage button (GPIO1) overlays a small QR code -- "SCAN TO
MANAGE" -- in the top-right corner of whatever photo is currently on
screen, linking to the server's config page, then reverts to the plain
photo after 30 seconds.

The overlay is spliced into the existing streaming fetch as chunks pass
through (frame_client.c's http_read_fn), rather than buffering the full
192,000-byte frame in RAM: only the small overlay rectangle itself
(~30KB) is ever held in memory, generated via new stride-parameterized
drawing helpers (epd_draw_*_ex in epd_draw.c) that let the existing
QR/text drawing code target an arbitrarily-sized buffer instead of a
full-frame one. epd7in3e.c is untouched -- it has no idea an overlay
exists.
This commit is contained in:
2026-07-19 00:50:07 -04:00
parent c4cd9b73e8
commit f74085cedf
13 changed files with 395 additions and 27 deletions
+15
View File
@@ -121,4 +121,19 @@ menu "ESPresso Frame Configuration"
FRAME_RESET_BUTTON_GPIO above; defaults to a different pin
than the reset button. Set to -1 to disable the feature.
config FRAME_MANAGE_BUTTON_GPIO
int "Manage button GPIO (-1 to disable)"
default 1
range -1 7
help
Button wired between this GPIO and GND (active-low, internal
pull-up enabled in firmware -- no external resistor needed).
Pressing it wakes the device (if asleep), displays the
current photo with a small "scan to manage" QR code overlaid
in the top-right corner (linking to the tools server's config
page) for 30 seconds, then reverts to the plain photo. Must
be GPIO 0-7 for the same deep-sleep-wakeup reason as
FRAME_RESET_BUTTON_GPIO above; defaults to a different pin
than the other two buttons. Set to -1 to disable the feature.
endmenu