Fix Arduino/epd4in2(bc) x_end calculation

This commit is contained in:
Xiaonan Shen 2020-02-29 19:54:34 -08:00
commit aa9f2a6904
No known key found for this signature in database
GPG key ID: D534E0A691A703A6
2 changed files with 4 additions and 4 deletions

View file

@ -159,7 +159,7 @@ void Epd::SetPartialWindow(const unsigned char* buffer_black, int x, int y, int
SendCommand(PARTIAL_WINDOW);
SendData(x >> 8);
SendData(x & 0xf8); // x should be the multiple of 8, the last 3 bit will always be ignored
SendData(((x & 0xf8) + w - 1) >> 8);
SendData(((x & 0xfff8) + w - 1) >> 8);
SendData(((x & 0xf8) + w - 1) | 0x07);
SendData(y >> 8);
SendData(y & 0xff);