Avoid ghosting on sleep screen by doing a full screen update

This commit is contained in:
Dave Allie 2025-12-05 17:55:17 +11:00
parent 85502b417e
commit 12d28e2148
No known key found for this signature in database
GPG Key ID: F2FDDB3AD8D0276F
3 changed files with 4 additions and 3 deletions

View File

@ -118,7 +118,7 @@ void EpdRenderer::clearScreen(const bool black) const {
display->fillScreen(black ? GxEPD_BLACK : GxEPD_WHITE);
}
void EpdRenderer::flushDisplay() const { display->display(true); }
void EpdRenderer::flushDisplay(const bool partialUpdate) const { display->display(partialUpdate); }
void EpdRenderer::flushArea(int x, int y, int width, int height) const {
// TODO: Fix

View File

@ -33,7 +33,7 @@ class EpdRenderer {
void drawRect(int x, int y, int width, int height, uint16_t color) const;
void fillRect(int x, int y, int width, int height, uint16_t color) const;
void clearScreen(bool black = false) const;
void flushDisplay() const;
void flushDisplay(bool partialUpdate = true) const;
void flushArea(int x, int y, int width, int height) const;
int getPageWidth() const;

View File

@ -10,5 +10,6 @@ void FullScreenMessageScreen::onEnter() {
renderer->clearScreen(invert);
renderer->drawText(left, top, text.c_str(), bold, italic, invert ? 0 : 1);
renderer->flushDisplay();
// If inverted, do a full screen update to ensure no ghosting
renderer->flushDisplay(!invert);
}