feat(eink): full refresh interval setting in Settings › Display

Add "Full rfsh" setting (e-ink only) with options off/5/10/20/30
partial refreshes between full refreshes. Prevents ghosting on panels
that accumulate artifacts after many partial updates.

GxEPDDisplay counts partial refreshes and calls display.display(false)
every N frames when the interval is set. Persisted in DataStore and
applied at startup via applyFullRefreshInterval().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-24 10:22:03 +02:00
co-authored by Claude Sonnet 4.6
parent 8012278483
commit a6bf3ee08f
8 changed files with 54 additions and 1 deletions
@@ -903,6 +903,7 @@ void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* no
applyBrightness();
applyFont();
applyRotation();
applyFullRefreshInterval();
setCurrScreen(splash);
}
@@ -1662,6 +1663,16 @@ void UITask::applyRotation() {
}
}
void UITask::applyFullRefreshInterval() {
if (_display != NULL && _node_prefs != NULL) {
static const uint8_t OPTS[] = { 0, 5, 10, 20, 30 };
static const int OPTS_COUNT = 5;
uint8_t idx = _node_prefs->eink_full_refresh_every;
if (idx >= OPTS_COUNT) idx = 0;
_display->setFullRefreshInterval(OPTS[idx]);
}
}
void UITask::setBrightnessLevel(uint8_t level) {
if (_node_prefs == NULL) return;
if (level > 4) level = 4;