From 5fa56c481fc311da3e010044949c33607fee15d9 Mon Sep 17 00:00:00 2001 From: Ivan Rakilovsky Date: Fri, 24 Jan 2020 12:10:45 +0000 Subject: [PATCH 1/2] fixed Displaypart method declaration --- Arduino/epd7in5_V2/epd7in5_V2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arduino/epd7in5_V2/epd7in5_V2.h b/Arduino/epd7in5_V2/epd7in5_V2.h index e23380c..04bf4f5 100644 --- a/Arduino/epd7in5_V2/epd7in5_V2.h +++ b/Arduino/epd7in5_V2/epd7in5_V2.h @@ -46,7 +46,7 @@ public: void SendData(unsigned char data); void Sleep(void); void Clear(void); - void Epd::Displaypart(const unsigned char* pbuffer, unsigned long Start_X, unsigned long Start_Y,unsigned long END_X,unsigned long END_Y); + void Displaypart(const unsigned char* pbuffer, unsigned long Start_X, unsigned long Start_Y,unsigned long END_X,unsigned long END_Y); private: unsigned int reset_pin; From c6f215a0fafec86f71650b94df262c0f7eff5747 Mon Sep 17 00:00:00 2001 From: Ivan Rakilovsky Date: Fri, 24 Jan 2020 12:16:25 +0000 Subject: [PATCH 2/2] 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);