Fix epaper set color for Heltec E213 and E290#2554
Open
doormatt-dev wants to merge 8 commits into
Open
Conversation
This file contains hidden or 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
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.
I noticed a massive black bar briefly appearing on the recent page when flipping through the pages on my E290 and when sending an advert. After digging through the code I realised that this is supposed to be the popup notification. It seemed like
the rectangle drawing function did not support changing the drawing. When I tried fixing that I realised that the setColor function was pretty much useless, so I essentially copied the implementation that the monochrome OLEDs and LCDs use. Later I also realised that bitmaps could also only be drawn in a single color and added color change support there too.
The popup on the recent page is a weird choice imo. It only appears when flipping through the pages forwards but not backwards. Some text saying "no recent contracts" when it's empty would probably be best. I might make a future PR for that and
better space utilisation of the big e-paper screen. It just seems like a waste of screen space to only display tiny text and only 4 recents.
The changes in this PR have been tested on a Heltec E290, the E213 and wireless paper should work the same way since they are very similar. The changes to bitmap drawing do not affect anything visually but allow for drawing white bitmaps on black background. The changes to the rectangle drawing functions allow the notification popup to be displayed correctly rather than being a solid black box.