add default value for color parameter
This commit is contained in:
parent
f21acab763
commit
85802dee4b
@ -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)
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user