fix(provisioning): stop redrawing the QR on every poll, add WiFi-fail retry screen
Two related fixes that together let the post-WiFi-setup window be quiet: 1. operation.h 204/404: skip the panel redraw entirely. The panel already holds the right thing — setup QR if no image has ever been painted (img_id == -1), or a real photo if img_id >= 0. Redrawing the QR every 15s during the bootstrap claim window put the e-ink into a perpetual ~20s mid-refresh loop and risked ghosting. Tests updated to assert no redraw on either sub-case. 2. main.cpp WiFi-fail path: drop the epd_fill(RED) + 3s delay + AP re-redraw sequence (~43s of e-ink work that destroyed the QR mid-flow) and replace with a single repaint of a new "Connection Failed — try again" Step 1/2 screen with red accents. gen_screens.py grows a gen_ap_retry() variant that recolors yellow → red and swaps the header/QR labels; the result is shipped as ap_bg_retry.bin alongside ap_bg.bin in LittleFS. epd.h exposes epd_draw_ap_screen_retry().
This commit is contained in:
@@ -179,6 +179,12 @@ void epd_draw_ap_screen(QRCode* qr) {
|
||||
draw_from_lfs("/ap_bg.bin", COLOR_YELLOW, qr, 563, 185, 5);
|
||||
}
|
||||
|
||||
void epd_draw_ap_screen_retry(QRCode* qr) {
|
||||
// Same QR coordinates — only the bg .bin differs (red accents,
|
||||
// "Connection Failed — try again" label).
|
||||
draw_from_lfs("/ap_bg_retry.bin", COLOR_RED, qr, 563, 185, 5);
|
||||
}
|
||||
|
||||
void epd_draw_setup_screen(QRCode* qr) {
|
||||
// SETUP_QR_X=553, SETUP_QR_Y=175, SETUP_QR_CELL=5 (must match gen_screens.py)
|
||||
draw_from_lfs("/setup_bg.bin", COLOR_GREEN, qr, 553, 175, 5);
|
||||
|
||||
Reference in New Issue
Block a user