More detailed log output

This commit is contained in:
Maximilian Giller 2021-10-07 12:43:17 +02:00
parent 1b05e094ee
commit 538419718d

View file

@ -36,7 +36,6 @@ class PeopleCounter ():
while self.keepRunning:
# Switch to other direction
direction: Directions = Directions.other(direction)
logging.debug(f'Direction [{direction}] at {datetime.now()}')
self.sensor.setDirection(direction)
@ -44,6 +43,8 @@ class PeopleCounter ():
triggered: bool = self.isTriggerDistance(distance)
changed: bool = self.updateState(direction, triggered)
logging.debug(f'Direction [{direction}] at {datetime.now()}\tDistance [{distance}cm]\tTriggered [{triggered}]')
if changed:
countChange: int = self.getCountChange(self.directionState)
self.handleCallbacks(countChange)