-
Notifications
You must be signed in to change notification settings - Fork 964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E-Ink "Dynamic Partial" #3193
Merged
Merged
E-Ink "Dynamic Partial" #3193
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use a mixture of full refresh, partial refresh, and skipped updates, balancing urgency and display health.
markbirss
approved these changes
Feb 10, 2024
@todd-herbert nice to see the display working without line at the bottom like the RAK14000 @thebentern sent me a v1 board and i already flashed your wip tree, just wish it had a i2c port. |
Great work. This is a good approach that we can slowly test out on other eink boards. |
thebentern
approved these changes
Feb 11, 2024
thebentern
added a commit
to meshtastic/artifacts
that referenced
this pull request
Feb 11, 2024
GUVWAF
pushed a commit
to GUVWAF/Meshtastic-device
that referenced
this pull request
Feb 11, 2024
Use a mixture of full refresh, partial refresh, and skipped updates, balancing urgency and display health. Co-authored-by: Ben Meadors <[email protected]>
mverch67
pushed a commit
that referenced
this pull request
Feb 12, 2024
Use a mixture of full refresh, partial refresh, and skipped updates, balancing urgency and display health. Co-authored-by: Ben Meadors <[email protected]>
thebentern
added a commit
that referenced
this pull request
Feb 14, 2024
* StoreForward updates - Send history in "text" variant - Don't send history the client already got - Check if PSRAM is full - More sensible defaults * Set `TEXT_BROADCAST` or `TEXT_DIRECT` RequestResponse tag * feat: E-Ink "Dynamic Partial" (#3193) Use a mixture of full refresh, partial refresh, and skipped updates, balancing urgency and display health. Co-authored-by: Ben Meadors <[email protected]> * [create-pull-request] automated change (#3209) Co-authored-by: thebentern <[email protected]> * Reset `last_index` if history was cleared, e.g. by reboot --------- Co-authored-by: Ben Meadors <[email protected]> Co-authored-by: todd-herbert <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: thebentern <[email protected]> Co-authored-by: Garth Vander Houwen <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#3075 (comment)
What it is
Selects between full refresh, partial refresh, and skipped updates, balancing urgency and display health. Non-intrusive, disabled by default. Implementable for individual boards.
How to implement it
For individual boards
1. Configure in
variant.h
EINK_LOWPRIORITY_LIMIT_SECONDS
: interval between "low priority" updatesEINK_HIGHPRIORITY_LIMIT_SECONDS
: min. interval between "high priority" updatesEINK_PARTIAL_REPEAT_LIMIT
: max. consecutive partial refreshes, before a full refresh is forced2. Adjust
configForPartialRefresh()
andconfigForFullRefresh()
, if necessaryThese methods are used internally to execute any code required to switch the display between partial and full refresh configurations. The should work out-of-the-box, but any "display specific" code can go here.
In GFX code
Graphics code should suggest that an update is either "high priority" or "low priority". This is considered by the Dynamic Partial code, when determining whether to use partial or full refresh.
EInkDisplay::highPriority()
- subsequent updates are important: show ASAPEInkDisplay::lowPriority()
- no rush with these onesFor the EInkDisplay class as it currently exists, this pull request has already implemented the required changes.
This is hooked into the existing update
display()
andforceDisplay()
methods:display()
are considered low priority - receives one perloop()
(?)forceDisplay()
are considered high priorityWhat does it change?
The main selection process is handled by this block, in
EInkDisplay::forceDisplay()
For the most part, the changes are additions, selected by the preprocessor. One exception is the minor refactoring of the "rate-limiting" code in
forceDisplay()
:firmware/src/graphics/EInkDisplay2.cpp
Line 131 in 1085b54
Structure has changed from:
to:
What will I notice?
Probably, nothing. This pull request only enables Dynamic Partial mode for
HELTEC_WIRELESS_PAPER_V1_0
. Ideally, there should be no impact on other boards.The hope is that devs will test Dynamic Partial mode on their own hardware, and if the result is good, implement it for the relevant boards; even if only as an interim measure, pending a rewrite of the EInkDisplay class I had seen mentioned in passing.
How is the refresh mode selected?
I will admit, the logic is slightly convoluted. I do believe though that the resulting behavior feels intuitive.
A rough outline: