Răsfoiți Sursa

fix 5.83bc imagesize

hnwangkg-ezio 5 ani în urmă
părinte
comite
272e467da0
2 a modificat fișierele cu 5 adăugiri și 5 ștergeri
  1. 4 4
      RaspberryPi&JetsonNano/c/examples/EPD_5in83bc_test.c
  2. 1 1
      Version_EN.txt

+ 4 - 4
RaspberryPi&JetsonNano/c/examples/EPD_5in83bc_test.c

@@ -45,17 +45,17 @@ int EPD_5in83bc_test(void)
     //Create a new image cache named IMAGE_BW and fill it with white
     UBYTE *BlackImage, *RYImage;
     UWORD Imagesize = ((EPD_5IN83BC_WIDTH % 8 == 0)? (EPD_5IN83BC_WIDTH / 8 ): (EPD_5IN83BC_WIDTH / 8 + 1)) * EPD_5IN83BC_HEIGHT;
-    if((BlackImage = (UBYTE *)malloc(Imagesize / 2)) == NULL) {
+    if((BlackImage = (UBYTE *)malloc(Imagesize)) == NULL) {
         printf("Failed to apply for black memory...\r\n");
         return -1;
     }
-    if((RYImage = (UBYTE *)malloc(Imagesize / 2)) == NULL) {
+    if((RYImage = (UBYTE *)malloc(Imagesize)) == NULL) {
         printf("Failed to apply for red memory...\r\n");
         return -1;
     }
     printf("NewImage:BlackImage and RYImage\r\n");
-    Paint_NewImage(BlackImage, EPD_5IN83BC_WIDTH, EPD_5IN83BC_HEIGHT / 2, 0, WHITE);
-    Paint_NewImage(RYImage, EPD_5IN83BC_WIDTH, EPD_5IN83BC_HEIGHT / 2, 0, WHITE);
+    Paint_NewImage(BlackImage, EPD_5IN83BC_WIDTH, EPD_5IN83BC_HEIGHT, 0, WHITE);
+    Paint_NewImage(RYImage, EPD_5IN83BC_WIDTH, EPD_5IN83BC_HEIGHT, 0, WHITE);
 
     //Select Image
     Paint_SelectImage(BlackImage);

+ 1 - 1
Version_EN.txt

@@ -3,4 +3,4 @@
 2019-10-8:  Add new programs for the 7.5inch V2 e-Paper and 7.5inch B V2 e-Paper programs.
 2019-10-11: Add new feature 2.7inch e-Paper 4 grayscale.
 2019-11-12: Adding a new feature 4.2inch e-Paper partial refresh display, partial refresh display is not good, not added in some routines.
-2019-11-13: Add a new feature 4.2inch e-Paper 4 grayscale.¡£
+2019-11-13: Add a new feature 4.2inch e-Paper 4 grayscale.