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()}`")