turn off the backlight when setting the screen to blank

This commit is contained in:
Tom J Nowell
2023-07-27 13:31:31 +01:00
parent 3fff6ffea2
commit 0287117d86

View File

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