소스 검색

Fixed bug in Arduino 7in5_V2 driver

SSYYL 4 년 전
부모
커밋
dc44d5c38d
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      Arduino/epd7in5_V2/epd7in5_V2.cpp

+ 2 - 3
Arduino/epd7in5_V2/epd7in5_V2.cpp

@@ -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++) {