This commit is contained in:
Jonas Zeunert
2022-05-06 23:26:26 +02:00
parent a1520884ee
commit 990afc1e19

View File

@@ -2,7 +2,7 @@ from threading import Timer
from utils.RepeatTimer import RepeatTimer from utils.RepeatTimer import RepeatTimer
import time import time
import random import random
import logging
import config import config
from lamps.Lamp import Lamp from lamps.Lamp import Lamp
@@ -246,12 +246,14 @@ class PlayerState:
pass pass
def startUpperPlayfieldTimer(self): def startUpperPlayfieldTimer(self):
logging.info("Started Upper Playfield Timer")
self.upperPlayfieldTimer = Timer(1, self.updatePlayfieldTime) self.upperPlayfieldTimer = Timer(1, self.updatePlayfieldTime)
def updatePlayfieldTime(self): def updatePlayfieldTime(self):
if self.upperPlayfieldTime == 0: if self.upperPlayfieldTime == 0:
self.upperPlayfieldTimer = None self.upperPlayfieldTimer = None
LeaveUpperPlayfieldEvent(self) LeaveUpperPlayfieldEvent(self)
logging.info("Stopped Upper Playfield Timer")
return return
if self.upperPlayfieldTime in [0, 5, 10, 20]: if self.upperPlayfieldTime in [0, 5, 10, 20]: