Procházet zdrojové kódy

Fixed bug in Arduino 7in5_V2 driver

SSYYL před 4 roky
rodič
revize
dc44d5c38d
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  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++) {