mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2025-12-18 07:07:41 +03:00
Avoid ghosting on sleep screen by doing a full screen update
This commit is contained in:
parent
85502b417e
commit
12d28e2148
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user