Don't render on each frame when the display is blank

What's the point in updating `image` if we're just going to display the blank one anyway? This should save a tiny bit of CPU/power
This commit is contained in:
Tom J Nowell
2023-07-22 15:17:54 +01:00
committed by GitHub
parent b1c4ed2f89
commit 6c0a703879

View File

@@ -1133,12 +1133,12 @@ Low Light Value {:.2f}
alarm.update(light_level_low)
viewcontroller.update()
viewcontroller.render()
if light_level_low and config.get_general().get("black_screen_when_light_low"):
display.display(image_blank.convert("RGB"))
else:
viewcontroller.render()
display.display(image.convert("RGB"))
config.set_general(