You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SendData(((x & 0xf8) + w - 1) >> 8);
SendData(((x & 0xf8) + w - 1) | 0x07);
Should be changed to:
SendData(((x & 0xff8) + w - 1) >> 8);
SendData(((x & 0xff8) + w - 1) | 0x07);
The glitch occurs when x is smaller than 255 and x+w is larger than 255, x & 0xf8 will clear all the bits above 8, which will make the computed HRED smaller than HRST, violating the datasheet. The result on the screen looks like jagged strips of torn pieces. To reproduce the glitched effect, one can change the number 200 to 280 in this line:
The bug can be easily fixed with a larger mask that does not discard the higher bits, e.g. 0xff8 or 0xfff8 etc. I've confirmed that this works on the 4.2inch module.
Thank you for publishing these demos, and for taking a look at this issue! Please feel free to let me know if I missed anything.
The text was updated successfully, but these errors were encountered:
Dear Waveshare team,
I believe there is a bug in
Epd::SetPartialWindow
(in Arduino/epd4in2b_V2, and probably a few other demos) that causes a visual glitch.More specifically, these two lines:
https://github.com/waveshareteam/e-Paper/blob/master/Arduino/epd4in2b_V2/epd4in2b_V2.cpp#L107
Should be changed to:
The glitch occurs when
x
is smaller than 255 andx+w
is larger than 255,x & 0xf8
will clear all the bits above 8, which will make the computed HRED smaller than HRST, violating the datasheet. The result on the screen looks like jagged strips of torn pieces. To reproduce the glitched effect, one can change the number 200 to 280 in this line:The bug can be easily fixed with a larger mask that does not discard the higher bits, e.g.
0xff8
or0xfff8
etc. I've confirmed that this works on the 4.2inch module.Thank you for publishing these demos, and for taking a look at this issue! Please feel free to let me know if I missed anything.
The text was updated successfully, but these errors were encountered: