test specific game monitoring

This commit is contained in:
2026-05-03 14:34:18 -04:00
parent efbb6f5737
commit 57aa924e7f
+23
View File
@@ -311,6 +311,14 @@ def draw_all_games(canvas, games, start_index):
for row in range(32):
canvas.SetPixel(offset + 63, row, 40, 40, 40)
def draw_single_game(canvas, game):
league = game["league"]
home_logo = load_logo(league, game["home"])
away_logo = load_logo(league, game["away"])
draw_logo(canvas, away_logo, 0, 0)
draw_logo(canvas, home_logo, 0, 16)
# --- Main loop ---
def run():
@@ -324,9 +332,24 @@ def run():
last_switch = time()
current_games = get_all_scores()
preferred_team = [
"BUF",
"TOR",
"TB"
]
preferred_game = []
for game in current_games:
print(game)
if game['home'] in preferred_team or game['away'] in preferred_team:
if game['status'] != 'Final':
preferred_game_on = True
preferred_game.append(game)
if preferred_game_on:
while True:
draw_single_game(canvas, preferred_game[0])
sleep(0.03)
else:
while True:
now = time()