cleanup. only update minutes

This commit is contained in:
2024-01-10 00:18:59 +01:00
parent 7b5ce4fd16
commit feefacdd8e
+5 -20
View File
@@ -72,33 +72,18 @@ try:
time_draw = ImageDraw.Draw(time_image)
epd.init(epd.FULL_UPDATE)
#setMode(epd.FULL_UPDATE)
time_image.paste(bmp, (2,2))
time_image.paste(bmp, (2,2))
epd.displayPartBaseImage(epd.getbuffer(time_image))
#display(time_image)
epd.init(epd.PART_UPDATE)
#setMode(epd.PART_UPDATE)
num = 0
while (True):
time_draw.rectangle((140, 90, 250, 122), fill = 255)
time_draw.text((140, 90), time.strftime('%H:%M:%S'), font = font24, fill = 0)
time_draw.rectangle((160, 90, 250, 122), fill = 255)
time_draw.text((160, 90), time.strftime('%H:%M'), font = font24, fill = 0)
epd.displayPartial(epd.getbuffer(time_image))
#display(time_image)
time.sleep(0.9)
epd.Clear(0xFF)
logging.info("Clear...")
epd.init(epd.FULL_UPDATE)
#setMode(epd.FULL_UPDATE)
epd.Clear(0xFF)
logging.info("Goto Sleep...")
epd.sleep()
time.sleep(5)
except IOError as e:
logging.info(e)
except KeyboardInterrupt:
except KeyboardInterrupt:
logging.info("ctrl + c:")
epd2in13_V2.epdconfig.module_exit(cleanup=True)
exit()