fix: epd2in13_V4 displayPartial ghosting due to missing 0x26 buffer update#416
Open
AdriBalla wants to merge 1 commit intowaveshareteam:masterfrom
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.
Problem
When using
displayPartial()on theepd2in13_V4(Waveshare 2.13 v4), visible ghosting and noise artifacts appear on every partial refresh. Previously displayed content "bleeds through" the new image, making the display unreadable over time.This also occurs on the first partial refresh following a full refresh via
display()ordisplay_fast().Root Cause
displayPartial()only writes to the0x24RAM buffer (new image) but never updates the0x26buffer (previous image reference). The display controller uses0x26as a reference to determine which pixels have changed and need to be flipped. Without a valid reference, the controller applies the partial waveform incorrectly, causing the ghosting artifacts.Similarly,
display()anddisplay_fast()only write to0x24, leaving0x26out of sync after a full refresh.Fix
_prev_bufferin__init__to track the last displayed imagedisplay()anddisplay_fast(): write image to both0x24and0x26displayPartial(): write_prev_bufferto0x26before writing thenew image to
0x24, then update_prev_bufferdisplayPartBaseImage()andClear(): keep_prev_bufferin syncTesting
Tested on Raspberry Pi Zero W with epd2in13_V4 (Waveshare 2.13 v4 HAT):