Skip to content

Commit

Permalink
Reimplement "Dynamic E-Ink" as a derived class
Browse files Browse the repository at this point in the history
  • Loading branch information
todd-herbert committed Mar 2, 2024
1 parent d20fa6e commit 517ed49
Show file tree
Hide file tree
Showing 7 changed files with 503 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/graphics/EInkDisplay2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ bool EInkDisplay::forceDisplay(uint32_t msecLimit)
#ifndef EINK_NO_HIBERNATE // Only hibernate if controller IC will preserve image memory
// Put screen to sleep to save power (possibly not necessary because we already did poweroff inside of display)
adafruitDisplay->hibernate();
LOG_DEBUG("done\n");
#endif

LOG_DEBUG("done\n");
return true;
}

Expand Down
4 changes: 3 additions & 1 deletion src/graphics/EInkDisplay2.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
/**
* An adapter class that allows using the GxEPD2 library as if it was an OLEDDisplay implementation.
*
* Note: EInkDynamicDisplay derives from this class.
*
* Remaining TODO:
* optimize display() to only draw changed pixels (see other OLED subclasses for examples)
* implement displayOn/displayOff to turn off the TFT device (and backlight)
Expand Down Expand Up @@ -41,7 +43,7 @@ class EInkDisplay : public OLEDDisplay
*
* @return true if we did draw the screen
*/
bool forceDisplay(uint32_t msecLimit = 1000);
virtual bool forceDisplay(uint32_t msecLimit = 1000);

/**
* shim to make the abstraction happy
Expand Down
Loading

0 comments on commit 517ed49

Please sign in to comment.