Skip to content

Commit

Permalink
Small re-org to make config options first
Browse files Browse the repository at this point in the history
  • Loading branch information
dtseiler committed Aug 21, 2023
1 parent bdf4e9a commit 387a38a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions hockeybox.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
print("RPi.GPIO %s" % GPIO.VERSION)
print("--------------------------------------------")

# Set thresholds for songs played before a song can be re-played
BTW_REPEAT_THRESHOLD = 25
INTERMISSION_REPEAT_THRESHOLD = 5
GOAL_REPEAT_THRESHOLD = 4
PENALTY_REPEAT_THRESHOLD = 4
POWERPLAY_REPEAT_THRESHOLD = 4

# mp3 locations
BASE_MP3_DIR = "/media/hockeybox"
GOAL_MP3_DIR = BASE_MP3_DIR + "/goal"
WARMUP_MP3_DIR = BASE_MP3_DIR + "/warmup"
Expand All @@ -33,18 +41,13 @@
USANTHEM_MP3_DIR = BASE_MP3_DIR + "/usanthem"
CDNANTHEM_MP3_DIR = BASE_MP3_DIR + "/cdnanthem"

# Track which songs have been played
# Queues to track played songs
btw_played_songs = deque([])
BTW_REPEAT_THRESHOLD = 25
intermission_num_played = 0
intermission_played_songs = deque([])
INTERMISSION_REPEAT_THRESHOLD = 5
goal_played_songs = deque([])
GOAL_REPEAT_THRESHOLD = 4
penalty_played_songs = deque([])
PENALTY_REPEAT_THRESHOLD = 4
powerplay_played_songs = deque([])
POWERPLAY_REPEAT_THRESHOLD = 4

#
# GPIO Setup
Expand Down

0 comments on commit 387a38a

Please sign in to comment.