Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
Reimplement "Dynamic E-Ink" as a derived class (meshtastic#3316)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Meadors <[email protected]>
  • Loading branch information
todd-herbert and thebentern authored Mar 3, 2024
1 parent 905718e commit c659292
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 c659292

Please sign in to comment.