mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-28 07:48:13 +00:00
feat(ui): full e-ink refresh on screen change + prune gone favourites
Two UI quick wins from the 2026-07-05 review: - E-ink: force a full (non-partial) refresh on the first frame of a new screen. Inter-screen ghosting was the most visible cheap win — the N-partials interval alone doesn't catch navigation. New DisplayDriver::forceFullRefresh() (no-op on OLED), set in setCurrScreen() and consumed by GxEPDDisplay::endFrame(). - Favourites: clear a stale "(gone)" tile at render time so it reverts to an empty "+" slot. Happens when prefs outlive the contact list (e.g. a wiped /contacts3); onContactRemoved only catches a live delete. Pruned slots are persisted once per pass (self-healing — an emptied slot can't re-fire). Builds green: WioTrackerL1_companion_solo_dual (OLED), WioTrackerL1Eink_companion_solo_dual (e-ink). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -275,10 +275,14 @@ void GxEPDDisplay::endFrame() {
|
||||
uint32_t crc = display_crc.finalize();
|
||||
if (crc != last_display_crc_value) {
|
||||
bool partial = true;
|
||||
if (_full_refresh_interval > 0 && ++_partial_count >= _full_refresh_interval) {
|
||||
// A forced full refresh (e.g. screen change) clears inter-screen ghosting.
|
||||
// Short-circuit so _partial_count isn't bumped on the forced pass; the block
|
||||
// resets it either way, matching the interval-driven full refresh.
|
||||
if (_force_full || (_full_refresh_interval > 0 && ++_partial_count >= _full_refresh_interval)) {
|
||||
partial = false;
|
||||
_partial_count = 0;
|
||||
}
|
||||
_force_full = false;
|
||||
display.display(partial);
|
||||
last_display_crc_value = crc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user