nickolay / esphome-lilygo-t547plus

Use Lilygo T5-4.7 inch ESP32-S3 (aka "plus"/V2.3) e-paper module with ESPHome
Other
32 stars 21 forks source link

Add quick display update #10

Open memthw opened 10 months ago

memthw commented 10 months ago

Added quick update for display based on #1 by removing epd_clear() from every draw and draw a white screen based on buffer. This will reduce the black/white flashing. The epd_clear() is called it only every n-th draw to prevent ghosting.

There are two new option full_update_every and quick_updating. Name Type Default Description
quick_updating bool false Toggle the quick updating function.
full_update_every int 5 Sets how many draws will be done before full clear using epd_clear().

It still won't work for Black on White

Sample config:

display:
  - platform: t547
    id: t547_display
    quick_updating: true
    full_update_every: 5
nickolay commented 10 months ago

This caused permanent ghosting for me after just a few cycles This is how the unit looks after running screen_repair and leaving it powered on. Does this not happen to you? Do you know if this can be fixed? IMG_3528

memthw commented 10 months ago

It is happening to me too. But it is only happening when the display power supply is off (epd_poweroff_all()). When the power supply is on (by commenting the last line in screen_repair it is okay. And it mostly went away after few cycles of screen_repair.

This is my first e-ink display and I don't know if it can cause damage to display.

I will try to find a solution to this and I'll have a look how to do a partial updates properly without this issue.

EDIT: It is completely gone after few epd_clear()

nickolay commented 10 months ago

I dunno about “a few” clears, but indeed ghosting is noticeably reduced as I run epd_clear / screen_repair multiple times. The vendor warns that not all “afterimages” can be fixed this way, so I wouldn’t run in this mode for a long time.

(You’re right that ghosting on a powered off display becomes most obvious, but for me it was noticeable during normal operation as well.)

Here people talk about using inverted images instead of 3x black-white flashing: https://github.com/vroland/epdiy/issues/30

But they also recommend using a different epaper in other issues, so I didn’t experiment with such advanced techniques.