mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-16 16:41:33 +10:00
Async full-refresh for EInkDynamicDisplay
This commit is contained in:
@@ -71,28 +71,24 @@ bool EInkDisplay::forceDisplay(uint32_t msecLimit)
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger the refresh in GxEPD2
|
||||
LOG_DEBUG("Updating E-Paper... ");
|
||||
|
||||
#if false
|
||||
// Currently unused; rescued from commented-out line during a refactor
|
||||
// Use a meaningful macro here if variant doesn't want fast refresh
|
||||
|
||||
// Full update mode (slow)
|
||||
adafruitDisplay->display(false)
|
||||
#else
|
||||
// Fast update mode
|
||||
adafruitDisplay->nextPage();
|
||||
#endif
|
||||
|
||||
// Power off display hardware
|
||||
// Most models: deep sleep.
|
||||
// Wireless Paper V1.1: power off only. Deep sleep clears memory - problems with fast refresh
|
||||
adafruitDisplay->hibernate();
|
||||
// End the update process
|
||||
endUpdate();
|
||||
|
||||
LOG_DEBUG("done\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
// End the update process - virtual method, overriden in derived class
|
||||
void EInkDisplay::endUpdate()
|
||||
{
|
||||
// Power off display hardware, then deep-sleep (Except Wireless Paper V1.1, no deep-sleep)
|
||||
adafruitDisplay->hibernate();
|
||||
}
|
||||
|
||||
// Write the buffer to the display memory
|
||||
void EInkDisplay::display(void)
|
||||
{
|
||||
@@ -193,6 +189,7 @@ bool EInkDisplay::connect()
|
||||
// Init GxEPD2
|
||||
adafruitDisplay->init();
|
||||
adafruitDisplay->setRotation(3);
|
||||
adafruitDisplay->clearScreen(); // Clearing now, so the boot logo will draw nice and smoothe (fast refresh)
|
||||
}
|
||||
#elif defined(PCA10059)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user