Skip to content

Added Support for Waveshare 2.7inch e-ink screen#12

Merged
infinition merged 3 commits into
infinition:mainfrom
IncredibleZuess:main
Nov 12, 2024
Merged

Added Support for Waveshare 2.7inch e-ink screen#12
infinition merged 3 commits into
infinition:mainfrom
IncredibleZuess:main

Conversation

@IncredibleZuess

Copy link
Copy Markdown
Contributor

Added some support for the Waveshare 2.7inch e-ink screen and fixed screen_flipped and screen_web_flipped not being initialized correctly

@JRunnerbox

Copy link
Copy Markdown

Woow

@IncredibleZuess IncredibleZuess mentioned this pull request Nov 10, 2024
@infinition infinition added the enhancement New feature or request label Nov 12, 2024

self.send_command(0x82) # VCM_DC_SETTING_REGISTER
self.send_data(0x12)
self.set_lut()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 infinition left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

This comment was marked as duplicate.

@infinition infinition left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed reversed assignment from initialize_variables(self), because it's already given by the condition in initialize_epd_display(self).

@infinition infinition merged commit d0d771e into infinition:main Nov 12, 2024
@infinition

Copy link
Copy Markdown
Owner

Please, let me know if my non hardcoded way works for you.

@ruidazeng ruidazeng left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm does this work?

Comment thread display.py

#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)))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Forgetting-Always

This comment was marked as spam.

Repository owner deleted a comment from Forgetting-Always Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants