Added missing indices

This commit is contained in:
Maximilian Giller 2021-12-03 17:57:34 +01:00
parent 445ad69236
commit 4673cd67f4

View file

@ -141,8 +141,8 @@ class PeopleCounter ():
th.start() th.start()
def handleTriggerCallbacks(self) -> None: def handleTriggerCallbacks(self) -> None:
insideTrigger = len(self.directionState[Directions.INSIDE]) > 0 and self.directionState[Directions.INSIDE][END_TIME] is None insideTrigger = len(self.directionState[Directions.INSIDE]) > 0 and self.directionState[Directions.INSIDE][-1][END_TIME] is None
outsideTrigger = len(self.directionState[Directions.OUTSIDE]) > 0 and self.directionState[Directions.OUTSIDE][END_TIME] is None outsideTrigger = len(self.directionState[Directions.OUTSIDE]) > 0 and self.directionState[Directions.OUTSIDE][-1][END_TIME] is None
triggerState = { triggerState = {
Directions.INSIDE: insideTrigger, Directions.INSIDE: insideTrigger,