e-Paper
e-Paper copied to clipboard
Rotated values in Arduino/epd2in9_V2 incorrectly calculated.
in file /waveshare/e-Paper/Arduino/epd2in9_V2/epdpaint.cpp
in function
Paint::DrawPixel(...)
Lines
121 x = this->width - y;
128 x = this->width - x;
129 y = this->height - y;
137 y = this->height - point_temp;
The code does not generate the correct new x/y values during rotation.
Solution: change this statements to
121 x = (this->width -1) - y;
128 x = (this->width -1) - x;
129 y = (this->height -1) - y;
137 y = (this->height -1) - point_temp;
There is the same bug in /waveshare/e-Paper/Arduino/epd4in2b_V2/epdpaint.cpp . I did not check if this error was also present in other paint objects of this project.
I have changed it in my lib for 2in7 display but cannot get right result for rotating text (90 or 270 degree) - does this work for you?