Audio einbauen, erste Tests. Audiodateien von Regatta Hero.
This commit is contained in:
parent
f6f515ea14
commit
a5baea524e
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -145,7 +145,7 @@ class RaceTracker(Page):
|
|||
last_id = self.app.track.hero_raceid
|
||||
self.app.track.hero_raceid = self.raceid
|
||||
self.app.track.hero_mqtt_subscribe(self.raceid, last_id)
|
||||
self.log.info(f"Selected race '{self.raceid}'")
|
||||
self.app.log.info(f"Selected race '{self.raceid}'")
|
||||
return True
|
||||
elif buttonid == 5:
|
||||
if self.mode == 'N':
|
||||
|
|
44
tracker.py
44
tracker.py
|
@ -54,6 +54,8 @@ class Tracker():
|
|||
self.trace = cfg['tracker']['trace'] # Debugging
|
||||
self.trace_fh = None # File Handle der Tracedatei
|
||||
|
||||
self.audiopath = cfg['audiopath']
|
||||
|
||||
self.buoys = {} # Tonnen (Hero=20)
|
||||
self.courses = [] # Bahnen
|
||||
self.races = [] # Regatten
|
||||
|
@ -411,8 +413,50 @@ class Tracker():
|
|||
if self.hero_racephase != racephase:
|
||||
# Phasenänderung! Event!
|
||||
print("Event: Phasenübergang {} -> {}".format(self.hero_racephase, racephase))
|
||||
if self.hero_racephase == 0:
|
||||
if racephase == 1:
|
||||
os.system("mpg123 -q " + os.path.join(self.audiopath, "startready.mp3"))
|
||||
elif self.hero_racephase == 1:
|
||||
if racephase == 3:
|
||||
# Startverschiebung aufgehoben
|
||||
pass
|
||||
elif racephase == 4:
|
||||
os.system("mpg123 -q " + os.path.join(self.audiopath, "dreiMin.mp3"))
|
||||
elif self.hero_racephase == 3:
|
||||
if racephase == 4:
|
||||
|
||||
pass
|
||||
elif self.hero_racephase == 4:
|
||||
if racephase == 1:
|
||||
os.system("mpg123 -q " + os.path.join(self.audiopath, "startVerschiebung.mp3"))
|
||||
if racephase == 5:
|
||||
# Blauer Peter oben
|
||||
os.system("mpg123 -q " + os.path.join(self.audiopath, "startVerschiebung.mp3"))
|
||||
elif self.hero_racephase == 5:
|
||||
if racephase == 6:
|
||||
# Blauer Peter runter
|
||||
pass
|
||||
# 8 -> 2 Allg. Rückruf
|
||||
# allgmRueck.mp3
|
||||
self.hero_racephase = racephase
|
||||
|
||||
# Timing
|
||||
countdown = {
|
||||
-9: 'neun.mp3',
|
||||
-8: 'acht.mp3',
|
||||
-7: 'sieben.mp3',
|
||||
-6: 'sechs.mp3',
|
||||
-5: 'fuenf.mp3',
|
||||
-4: 'vier.mp3',
|
||||
-3: 'drei.mp3',
|
||||
-2: 'zwei.mp3',
|
||||
-1: 'eins.mp3'
|
||||
}
|
||||
if payload['racestatus']['time'] == -60:
|
||||
os.system("mpg123 -q " + os.path.join(self.audiopath, "eineMin.mp3"))
|
||||
elif payload['racestatus']['time'] > -10 and payload['racestatus']['time'] < 0:
|
||||
os.system("mpg123 -q " + os.path.join(self.audiopath, countdown[payload['racestatus']['time']]))
|
||||
|
||||
# payload['racestatus']['racestarted']
|
||||
# payload['racesettings']
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue