mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-11 05:13:01 +00:00
Fix: Calendar event flashing, display one event per cycle
This commit is contained in:
@@ -260,6 +260,12 @@ class CalendarManager:
|
|||||||
# Update the display
|
# Update the display
|
||||||
self.display_manager.update_display()
|
self.display_manager.update_display()
|
||||||
logging.debug("CalendarManager event display updated.")
|
logging.debug("CalendarManager event display updated.")
|
||||||
|
|
||||||
# Increment index for next call
|
def advance_event(self):
|
||||||
self.current_event_index += 1
|
"""Advance to the next event. Called by DisplayManager when calendar display time is up."""
|
||||||
|
if not self.events:
|
||||||
|
return
|
||||||
|
self.current_event_index += 1
|
||||||
|
if self.current_event_index >= len(self.events):
|
||||||
|
self.current_event_index = 0
|
||||||
|
logging.debug(f"CalendarManager advanced to event index {self.current_event_index}")
|
||||||
@@ -346,6 +346,8 @@ class DisplayController:
|
|||||||
logger.info(f"Switching to: {self.current_display_mode}")
|
logger.info(f"Switching to: {self.current_display_mode}")
|
||||||
self.force_clear = True
|
self.force_clear = True
|
||||||
self.last_switch = current_time
|
self.last_switch = current_time
|
||||||
|
if self.current_display_mode != 'calendar' and self.calendar:
|
||||||
|
self.calendar.advance_event()
|
||||||
|
|
||||||
# Display current mode frame (only for non-live modes)
|
# Display current mode frame (only for non-live modes)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user