switch properly

This commit is contained in:
2026-08-02 00:39:18 -04:00
parent 965fc59ece
commit b0f502313a
3 changed files with 3 additions and 10 deletions
+2
View File
@@ -11,6 +11,8 @@ def main():
print(scoreboard_matrix.current_slide)
if scoreboard_matrix.current_slide == "score":
canvas = score.draw_frame(scoreboard_matrix)
if not canvas:
scoreboard_matrix.current_slide = "fantasy"
if canvas:
scoreboard_matrix.canvas = scoreboard_matrix.matrix.SwapOnVSync(canvas)
+1 -2
View File
@@ -207,8 +207,7 @@ def draw_frame(matrix):
if next_x >= total_scroll_width:
scroll_x = 0
tick = 0
matrix.next_slide("fantasy")
return matrix.canvas
return None
scroll_x = next_x
return matrix.canvas
-8
View File
@@ -6,7 +6,6 @@ import vars
class ScoreboardMatrix():
logo_cache = {}
current_slide = "score"
slide_count = 0
options = RGBMatrixOptions()
options.rows = 32
options.cols = 64
@@ -41,11 +40,4 @@ class ScoreboardMatrix():
self.logo_cache[key] = None
return None
def iterate_slide_count(self):
self.slide_count += 1
def next_slide(self, slide_name):
self.slide_count = 0
self.current_slide = slide_name