Added Support for Waveshare 2.7inch e-ink screen#12
Merged
Conversation
…add support to 2in7 eink
…nstall script to include the 2in7 display
|
Woow |
Closed
Forgetting-Always
approved these changes
Nov 12, 2024
ruidazeng
suggested changes
Nov 12, 2024
|
|
||
| self.send_command(0x82) # VCM_DC_SETTING_REGISTER | ||
| self.send_data(0x12) | ||
| self.set_lut() |
There was a problem hiding this comment.
Might be better to replace magic numbers with defined constants throughout the codes:
PANEL_SETTING = 0xAF
PLL_CONTROL = 0x3A
VCOM_DATA_INTERVAL_SETTING = 0x57
infinition
reviewed
Nov 12, 2024
infinition
left a comment
Owner
There was a problem hiding this comment.
feat(display): Add configurable frise position based on display type
- Add dictionary to manage frise positions for different display types
- Add get_frise_position() method to dynamically retrieve position
- Replace hardcoded frise position with configurable one
- Add default position for non-specified display types
- Maintain backward compatibility with existing displays
This change makes the frise position configurable through the EPD type configuration, improving maintainability and making it easier to add support for new display types.
infinition
reviewed
Nov 12, 2024
infinition
left a comment
Owner
There was a problem hiding this comment.
removed reversed assignment from initialize_variables(self), because it's already given by the condition in initialize_epd_display(self).
Owner
|
Please, let me know if my non hardcoded way works for you. |
|
|
||
| #Fix the frise for the 2in7 display | ||
| if self.config["epd_type"] == "epd2in7": | ||
| image.paste(self.shared_data.frise, (int(50 * self.scale_factor_x), int(160 * self.scale_factor_y))) |
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.
Added some support for the Waveshare 2.7inch e-ink screen and fixed screen_flipped and screen_web_flipped not being initialized correctly