mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03:01 +00:00
Slow down redraw rate
Slowing redraw to try and fix flicker
This commit is contained in:
@@ -26,7 +26,7 @@ class DisplayController:
|
||||
try:
|
||||
while True:
|
||||
current_time = time.time()
|
||||
rotation_interval = self.config['display'].get('rotation_interval', 10)
|
||||
rotation_interval = self.config['display'].get('rotation_interval', 15)
|
||||
|
||||
# Switch display if interval has passed
|
||||
if current_time - self.last_switch > rotation_interval:
|
||||
@@ -44,8 +44,8 @@ class DisplayController:
|
||||
logger.debug("Updating weather display")
|
||||
self.weather.display_weather()
|
||||
|
||||
# Small delay to prevent CPU overload
|
||||
time.sleep(0.1)
|
||||
# Sleep for 0.5 seconds since we only need to check for second changes
|
||||
time.sleep(0.5)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print("\nDisplay stopped by user")
|
||||
|
||||
Reference in New Issue
Block a user