Fixed bug in Arduino 7in5_V2 driver

This commit is contained in:
SSYYL 2021-08-10 17:49:38 +08:00
parent 2f1eeee9f5
commit dc44d5c38d

View file

@ -229,8 +229,8 @@ void Epd::DisplayFrame(const unsigned char* frame_buffer) {
SendCommand(0x13);
for (unsigned long j = 0; j < height; j++) {
for (unsigned long i = 0; i < width; i++) {
SendData(~frame_buffer[i + j * width]);
for (unsigned long i = 0; i < width/8; i++) {
SendData(~frame_buffer[i + j * width/8]);
}
}
SendCommand(0x12);
@ -240,7 +240,6 @@ void Epd::DisplayFrame(const unsigned char* frame_buffer) {
void Epd::Displaypart(const unsigned char* pbuffer, unsigned long xStart, unsigned long yStart,unsigned long Picture_Width,unsigned long Picture_Height) {
SendCommand(0x13);
int * padd;
// xStart = xStart/8;
// xStart = xStart*8;
for (unsigned long j = 0; j < height; j++) {