Update monitor.py to use the new sleep and wake functions

also moved wake one line forward so the display isn't on but not updated while rendering
This commit is contained in:
Tom J Nowell
2023-08-07 15:32:05 +01:00
committed by GitHub
parent 09d294600a
commit 2b0c8aefd7

View File

@@ -1135,11 +1135,11 @@ Low Light Value {:.2f}
viewcontroller.update() viewcontroller.update()
if light_level_low and config.get_general().get("black_screen_when_light_low"): if light_level_low and config.get_general().get("black_screen_when_light_low"):
display.set_backlight(GPIO.LOW) display.sleep()
display.display(image_blank.convert("RGB")) display.display(image_blank.convert("RGB"))
else: else:
display.set_backlight(GPIO.HIGH)
viewcontroller.render() viewcontroller.render()
display.wake()
display.display(image.convert("RGB")) display.display(image.convert("RGB"))
config.set_general( config.set_general(