From 21372f4b1450fd758ad0ec1c704db84fb77f00fb Mon Sep 17 00:00:00 2001 From: Robert Borzutzki Date: Wed, 19 Oct 2022 13:34:04 +0200 Subject: [PATCH] activate partUpdate --- examples/epd_2in13d_test.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/epd_2in13d_test.py b/examples/epd_2in13d_test.py index 62c3ca4..7eaaf13 100644 --- a/examples/epd_2in13d_test.py +++ b/examples/epd_2in13d_test.py @@ -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()