mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-11 13:23:00 +00:00
ensure game rotation count respects user defined variable
This commit is contained in:
@@ -1562,7 +1562,7 @@ class MiLBRecentManager(BaseMiLBManager):
|
||||
current_time = time.time()
|
||||
|
||||
# Check if it's time to switch games
|
||||
if current_time - self.last_game_switch >= self.game_display_duration:
|
||||
if len(self.recent_games) > 1 and current_time - self.last_game_switch >= self.game_display_duration:
|
||||
# Move to next game
|
||||
self.current_game_index = (self.current_game_index + 1) % len(self.recent_games)
|
||||
self.current_game = self.recent_games[self.current_game_index]
|
||||
@@ -1760,7 +1760,7 @@ class MiLBUpcomingManager(BaseMiLBManager):
|
||||
current_time = time.time()
|
||||
|
||||
# Check if it's time to switch games
|
||||
if current_time - self.last_game_switch >= self.game_display_duration:
|
||||
if len(self.upcoming_games) > 1 and current_time - self.last_game_switch >= self.game_display_duration:
|
||||
# Move to next game
|
||||
self.current_game_index = (self.current_game_index + 1) % len(self.upcoming_games)
|
||||
self.current_game = self.upcoming_games[self.current_game_index]
|
||||
|
||||
Reference in New Issue
Block a user