mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-11 13:23:00 +00:00
tracking time since last switch to improve song change performance
This commit is contained in:
@@ -397,10 +397,9 @@ class DisplayController:
|
|||||||
logger.debug("DisplayController received music update (via callback): Track is None or not playing.")
|
logger.debug("DisplayController received music update (via callback): Track is None or not playing.")
|
||||||
|
|
||||||
if self.current_display_mode == 'music' and self.music_manager:
|
if self.current_display_mode == 'music' and self.music_manager:
|
||||||
logger.info("Music is current display mode and track updated. Signaling immediate refresh.")
|
logger.info("Music is current display mode and track updated. Signaling immediate refresh and resetting mode timer.")
|
||||||
# Force the main loop to re-evaluate and re-display the current mode.
|
# Force the main loop to re-evaluate and re-display the current mode.
|
||||||
# Setting mode_start_time to effectively zero makes the current display duration "expired".
|
self.last_switch = time.time() # Reset the timer to ensure this update is shown
|
||||||
self.mode_start_time = 0
|
|
||||||
self.force_clear = True # Tell the display method to clear before drawing
|
self.force_clear = True # Tell the display method to clear before drawing
|
||||||
# If the current display mode is music, the MusicManager's display method will be called
|
# If the current display mode is music, the MusicManager's display method will be called
|
||||||
# in the main loop and will use its own updated internal state. No explicit action needed here
|
# in the main loop and will use its own updated internal state. No explicit action needed here
|
||||||
|
|||||||
Reference in New Issue
Block a user