fb4c5ff5d3
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().
19 lines
679 B
C
19 lines
679 B
C
#pragma once
|
|
#include "Arduino.h"
|
|
|
|
// Call counters for assertions
|
|
extern int g_epd_init_count;
|
|
extern int g_epd_sleep_count;
|
|
extern int g_epd_draw_image_count;
|
|
extern int g_epd_fill_count;
|
|
extern int g_epd_fill_last_color;
|
|
extern int g_epd_draw_setup_count;
|
|
|
|
inline void epd_init() { g_epd_init_count++; }
|
|
inline void epd_sleep() { g_epd_sleep_count++; }
|
|
inline void epd_draw_image_from_file(File& f) { g_epd_draw_image_count++; }
|
|
inline void epd_fill(int color) { g_epd_fill_count++; g_epd_fill_last_color = color; }
|
|
inline void epd_draw_ap_screen(void*) {}
|
|
inline void epd_draw_ap_screen_retry(void*) {}
|
|
inline void epd_draw_setup_screen(void*) { g_epd_draw_setup_count++; }
|