From f163533b08ad280a804b66842276b794dc8ad9c7 Mon Sep 17 00:00:00 2001 From: Robert Borzutzki Date: Wed, 19 Oct 2022 15:17:52 +0200 Subject: [PATCH] fix --- examples/mqtt.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/mqtt.py b/examples/mqtt.py index b773050..b9c6303 100644 --- a/examples/mqtt.py +++ b/examples/mqtt.py @@ -46,8 +46,8 @@ try: #epd.display(epd.getbuffer(HBlackimage), epd.getbuffer(HRedimage)) epd.DisplayPartial(epd.getbuffer(HBlackimage)) - values_image = Image.new('1', (epd.height, epd.width), 255) - values_draw = ImageDraw.Draw(values_image) + #values_image = Image.new('1', (epd.height, epd.width), 255) + #values_draw = ImageDraw.Draw(values_image) time.sleep(2) @@ -82,9 +82,9 @@ def on_message(client, userdata, msg): line = 60 print(line) - values_draw.rectangle((150, line, 220, 50), fill = 0) - values_draw.text((150, line), msg.payload.decode(), font = font10, fill = 0) - epd.DisplayPartial(epd.getbuffer(values_image)) + drawblack.rectangle((150, line, 220, 50), fill = 0) + drawblack.text((150, line), msg.payload.decode(), font = font10, fill = 0) + epd.DisplayPartial(epd.getbuffer(HBlackimage)) time.sleep(1) #print(f"`{msg.topic}`: `{msg.payload.decode()}`")