Parcourir la source

add default value for color parameter

txoof il y a 2 ans
Parent
commit
85802dee4b

+ 1 - 1
RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd1in54.py

@@ -236,7 +236,7 @@ class EPD:
                 self.send_data(image[i + j * int(self.width / 8)])   
         self.TurnOnDisplay()
         
-    def Clear(self, color):
+    def Clear(self, color=0xFF):
         # self.SetWindow(0, 0, self.width - 1, self.height - 1)
         # send the color data
         self.SetWindow(0, 0, self.width, self.height)

+ 1 - 1
RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd1in54_V2.py

@@ -244,7 +244,7 @@ class EPD:
             
             self.set_lut(self.WF_Full_1IN54) # Set lut
         
-    def Clear(self, color):
+    def Clear(self, color=0xFF):
         if self.width%8 == 0:
             linewidth = int(self.width/8)
         else:

+ 1 - 1
RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in13.py

@@ -201,7 +201,7 @@ class EPD:
                 self.send_data(image[i + j * linewidth])   
         self.TurnOnDisplay()
     
-    def Clear(self, color):
+    def Clear(self, color=0xFF):
         if self.width%8 == 0:
             linewidth = int(self.width/8)
         else:

+ 1 - 1
RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in13_V2.py

@@ -280,7 +280,7 @@ class EPD:
         self.send_data2(image)  
         self.TurnOnDisplay()
     
-    def Clear(self, color):
+    def Clear(self, color=0xFF):
         if self.width%8 == 0:
             linewidth = int(self.width/8)
         else:

+ 1 - 1
RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in13_V3.py

@@ -361,7 +361,7 @@ class EPD:
     function : Clear screen
     parameter:
     '''
-    def Clear(self, color):
+    def Clear(self, color=0xFF):
         if self.width%8 == 0:
             linewidth = int(self.width/8)
         else:

+ 1 - 1
RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in9.py

@@ -185,7 +185,7 @@ class EPD:
                 self.send_data(image[i + j * int(self.width / 8)])   
         self.TurnOnDisplay()
         
-    def Clear(self, color):
+    def Clear(self, color=0xFF):
         self.SetWindow(0, 0, self.width - 1, self.height - 1)
         for j in range(0, self.height):
             self.SetCursor(0, j)

+ 1 - 1
RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in9_V2.py

@@ -285,7 +285,7 @@ class EPD:
         self.send_data2(image)   
         self.TurnOnDisplay_Partial()
 
-    def Clear(self, color):
+    def Clear(self, color=0xFF):
         if self.width%8 == 0:
             linewidth = int(self.width/8)
         else: