mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-11 21:33:00 +00:00
ensure game rotation count respects user defined variable
This commit is contained in:
@@ -935,7 +935,7 @@ class NCAABaseballRecentManager(BaseNCAABaseballManager):
|
||||
return
|
||||
try:
|
||||
current_time = time.time()
|
||||
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:
|
||||
self.current_game_index = (self.current_game_index + 1) % len(self.recent_games)
|
||||
self.current_game = self.recent_games[self.current_game_index]
|
||||
self.last_game_switch = current_time
|
||||
@@ -1035,7 +1035,7 @@ class NCAABaseballUpcomingManager(BaseNCAABaseballManager):
|
||||
return
|
||||
try:
|
||||
current_time = time.time()
|
||||
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:
|
||||
self.current_game_index = (self.current_game_index + 1) % len(self.upcoming_games)
|
||||
self.current_game = self.upcoming_games[self.current_game_index]
|
||||
self.last_game_switch = current_time
|
||||
|
||||
Reference in New Issue
Block a user