Invalidate the tracked display CRC when a non-photo screen is drawn
The QR onboarding and "CONNECTING..." status screens write to the panel through a separate path that never touched the last-displayed-photo CRC added in the previous commit. That left it stale relative to what's actually on screen after either one draws -- most visibly after a factory reset: reprovisioning and reconnecting could fetch a photo whose CRC happened to match the one from before the reset, skip the refresh, and leave the QR code frozen on screen indefinitely. Both screens now invalidate the tracked CRC right after drawing, so the next photo fetch is always guaranteed to actually refresh.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "epd7in3e.h"
|
||||
#include "epd_draw.h"
|
||||
#include "fonts.h"
|
||||
#include "wifi_provisioning.h"
|
||||
|
||||
#include "status_screen.h"
|
||||
|
||||
@@ -58,5 +59,12 @@ esp_err_t status_screen_show(const char *wifi_ssid, status_state_t wifi_state, c
|
||||
esp_err_t err = epd_display_buffer(frame, EPD_FRAME_BYTES);
|
||||
free(frame);
|
||||
|
||||
if (err == ESP_OK) {
|
||||
/* This just overwrote the panel with non-photo content -- the
|
||||
* tracked last-displayed-photo CRC no longer describes what's
|
||||
* actually on screen. */
|
||||
frame_config_invalidate_last_display_crc32();
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user