activate partUpdate
This commit is contained in:
parent
cae56b7cb7
commit
21372f4b14
@ -59,20 +59,20 @@ try:
|
||||
|
||||
# partial update
|
||||
logging.info("5.show time...")
|
||||
# epd.init()
|
||||
# epd.Clear()
|
||||
# time_image = Image.new('1', (epd.width, epd.height), 255)
|
||||
# time_draw = ImageDraw.Draw(time_image)
|
||||
# num = 0
|
||||
# while (True):
|
||||
# time_draw.rectangle((10, 10, 120, 50), fill = 255)
|
||||
# time_draw.text((10, 10), time.strftime('%H:%M:%S'), font = font24, fill = 0)
|
||||
# newimage = time_image.crop([10, 10, 120, 50])
|
||||
# time_image.paste(newimage, (10,10))
|
||||
# epd.DisplayPartial(epd.getbuffer(time_image))
|
||||
# num = num + 1
|
||||
# if(num == 10):
|
||||
# break
|
||||
epd.init()
|
||||
epd.Clear()
|
||||
time_image = Image.new('1', (epd.width, epd.height), 255)
|
||||
time_draw = ImageDraw.Draw(time_image)
|
||||
num = 0
|
||||
while (True):
|
||||
time_draw.rectangle((10, 10, 120, 50), fill = 255)
|
||||
time_draw.text((10, 10), time.strftime('%H:%M:%S'), font = font24, fill = 0)
|
||||
newimage = time_image.crop([10, 10, 120, 50])
|
||||
time_image.paste(newimage, (10,10))
|
||||
epd.DisplayPartial(epd.getbuffer(time_image))
|
||||
num = num + 1
|
||||
if(num == 10):
|
||||
break
|
||||
|
||||
logging.info("Clear...")
|
||||
epd.init()
|
||||
|
Loading…
Reference in New Issue
Block a user