More detailed log output
This commit is contained in:
parent
1b05e094ee
commit
538419718d
1 changed files with 2 additions and 1 deletions
|
@ -36,7 +36,6 @@ class PeopleCounter ():
|
||||||
while self.keepRunning:
|
while self.keepRunning:
|
||||||
# Switch to other direction
|
# Switch to other direction
|
||||||
direction: Directions = Directions.other(direction)
|
direction: Directions = Directions.other(direction)
|
||||||
logging.debug(f'Direction [{direction}] at {datetime.now()}')
|
|
||||||
|
|
||||||
self.sensor.setDirection(direction)
|
self.sensor.setDirection(direction)
|
||||||
|
|
||||||
|
@ -44,6 +43,8 @@ class PeopleCounter ():
|
||||||
triggered: bool = self.isTriggerDistance(distance)
|
triggered: bool = self.isTriggerDistance(distance)
|
||||||
changed: bool = self.updateState(direction, triggered)
|
changed: bool = self.updateState(direction, triggered)
|
||||||
|
|
||||||
|
logging.debug(f'Direction [{direction}] at {datetime.now()}\tDistance [{distance}cm]\tTriggered [{triggered}]')
|
||||||
|
|
||||||
if changed:
|
if changed:
|
||||||
countChange: int = self.getCountChange(self.directionState)
|
countChange: int = self.getCountChange(self.directionState)
|
||||||
self.handleCallbacks(countChange)
|
self.handleCallbacks(countChange)
|
||||||
|
|
Loading…
Reference in a new issue