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.send_data(image[i + j * int(self.width / 8)])
|
||||||
self.TurnOnDisplay()
|
self.TurnOnDisplay()
|
||||||
|
|
||||||
def Clear(self, color):
|
def Clear(self, color=0xFF):
|
||||||
# self.SetWindow(0, 0, self.width - 1, self.height - 1)
|
# self.SetWindow(0, 0, self.width - 1, self.height - 1)
|
||||||
# send the color data
|
# send the color data
|
||||||
self.SetWindow(0, 0, self.width, self.height)
|
self.SetWindow(0, 0, self.width, self.height)
|
||||||
|
@ -244,7 +244,7 @@ class EPD:
|
|||||||
|
|
||||||
self.set_lut(self.WF_Full_1IN54) # Set lut
|
self.set_lut(self.WF_Full_1IN54) # Set lut
|
||||||
|
|
||||||
def Clear(self, color):
|
def Clear(self, color=0xFF):
|
||||||
if self.width%8 == 0:
|
if self.width%8 == 0:
|
||||||
linewidth = int(self.width/8)
|
linewidth = int(self.width/8)
|
||||||
else:
|
else:
|
||||||
|
@ -201,7 +201,7 @@ class EPD:
|
|||||||
self.send_data(image[i + j * linewidth])
|
self.send_data(image[i + j * linewidth])
|
||||||
self.TurnOnDisplay()
|
self.TurnOnDisplay()
|
||||||
|
|
||||||
def Clear(self, color):
|
def Clear(self, color=0xFF):
|
||||||
if self.width%8 == 0:
|
if self.width%8 == 0:
|
||||||
linewidth = int(self.width/8)
|
linewidth = int(self.width/8)
|
||||||
else:
|
else:
|
||||||
|
@ -280,7 +280,7 @@ class EPD:
|
|||||||
self.send_data2(image)
|
self.send_data2(image)
|
||||||
self.TurnOnDisplay()
|
self.TurnOnDisplay()
|
||||||
|
|
||||||
def Clear(self, color):
|
def Clear(self, color=0xFF):
|
||||||
if self.width%8 == 0:
|
if self.width%8 == 0:
|
||||||
linewidth = int(self.width/8)
|
linewidth = int(self.width/8)
|
||||||
else:
|
else:
|
||||||
|
@ -361,7 +361,7 @@ class EPD:
|
|||||||
function : Clear screen
|
function : Clear screen
|
||||||
parameter:
|
parameter:
|
||||||
'''
|
'''
|
||||||
def Clear(self, color):
|
def Clear(self, color=0xFF):
|
||||||
if self.width%8 == 0:
|
if self.width%8 == 0:
|
||||||
linewidth = int(self.width/8)
|
linewidth = int(self.width/8)
|
||||||
else:
|
else:
|
||||||
|
@ -185,7 +185,7 @@ class EPD:
|
|||||||
self.send_data(image[i + j * int(self.width / 8)])
|
self.send_data(image[i + j * int(self.width / 8)])
|
||||||
self.TurnOnDisplay()
|
self.TurnOnDisplay()
|
||||||
|
|
||||||
def Clear(self, color):
|
def Clear(self, color=0xFF):
|
||||||
self.SetWindow(0, 0, self.width - 1, self.height - 1)
|
self.SetWindow(0, 0, self.width - 1, self.height - 1)
|
||||||
for j in range(0, self.height):
|
for j in range(0, self.height):
|
||||||
self.SetCursor(0, j)
|
self.SetCursor(0, j)
|
||||||
|
@ -285,7 +285,7 @@ class EPD:
|
|||||||
self.send_data2(image)
|
self.send_data2(image)
|
||||||
self.TurnOnDisplay_Partial()
|
self.TurnOnDisplay_Partial()
|
||||||
|
|
||||||
def Clear(self, color):
|
def Clear(self, color=0xFF):
|
||||||
if self.width%8 == 0:
|
if self.width%8 == 0:
|
||||||
linewidth = int(self.width/8)
|
linewidth = int(self.width/8)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user