mirror of
https://github.com/pimoroni/grow-python
synced 2025-10-25 15:19:23 +00:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user