fix
This commit is contained in:
		
							parent
							
								
									5f96166bea
								
							
						
					
					
						commit
						47e7d6b0a0
					
				@ -44,10 +44,10 @@ try:
 | 
				
			|||||||
    drawblack.text((5, 45), 'Batterie %', font = font10, fill = 0)
 | 
					    drawblack.text((5, 45), 'Batterie %', font = font10, fill = 0)
 | 
				
			||||||
    drawblack.text((5, 60), 'Batterie Laden/Entladen', font = font10, fill = 0)
 | 
					    drawblack.text((5, 60), 'Batterie Laden/Entladen', font = font10, fill = 0)
 | 
				
			||||||
    #epd.display(epd.getbuffer(HBlackimage), epd.getbuffer(HRedimage))
 | 
					    #epd.display(epd.getbuffer(HBlackimage), epd.getbuffer(HRedimage))
 | 
				
			||||||
    epd.display(epd.getbuffer(HBlackimage))
 | 
					    epd.DisplayPartial(epd.getbuffer(HBlackimage))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    values_image = Image.new('1', (epd.width, epd.height), 255)
 | 
					    #values_image = Image.new('1', (epd.width, epd.height), 255)
 | 
				
			||||||
    values_draw = ImageDraw.Draw(values_image)
 | 
					    #values_draw = ImageDraw.Draw(values_image)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    time.sleep(2)
 | 
					    time.sleep(2)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -82,8 +82,8 @@ def on_message(client, userdata, msg):
 | 
				
			|||||||
        line = 60
 | 
					        line = 60
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    print(line)
 | 
					    print(line)
 | 
				
			||||||
    values_draw.text((150, line), msg.payload.decode(), font = font10, fill = 0)
 | 
					    drawblack.text((150, line), msg.payload.decode(), font = font10, fill = 0)
 | 
				
			||||||
    epd.DisplayPartial(epd.getbuffer(values_image))
 | 
					    epd.DisplayPartial(epd.getbuffer(HBlackimage))
 | 
				
			||||||
    #print(f"`{msg.topic}`: `{msg.payload.decode()}`")
 | 
					    #print(f"`{msg.topic}`: `{msg.payload.decode()}`")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Connected = False   #global variable for the state of the connection
 | 
					Connected = False   #global variable for the state of the connection
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user