From c6f215a0fafec86f71650b94df262c0f7eff5747 Mon Sep 17 00:00:00 2001 From: Ivan Rakilovsky Date: Fri, 24 Jan 2020 12:16:25 +0000 Subject: [PATCH] fixed DisplayFrame method - width not calculated properly --- Arduino/epd7in5_V2/epd7in5_V2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Arduino/epd7in5_V2/epd7in5_V2.cpp b/Arduino/epd7in5_V2/epd7in5_V2.cpp index ed96de2..8594823 100644 --- a/Arduino/epd7in5_V2/epd7in5_V2.cpp +++ b/Arduino/epd7in5_V2/epd7in5_V2.cpp @@ -121,8 +121,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);