mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03: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
|
||||
self.display_manager.update_display()
|
||||
logging.debug("CalendarManager event display updated.")
|
||||
|
||||
# Increment index for next call
|
||||
self.current_event_index += 1
|
||||
|
||||
def advance_event(self):
|
||||
"""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}")
|
||||
self.force_clear = True
|
||||
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)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user