mash-sensor-tof-pc/src/console_counter.py

17 lines
336 B
Python
Raw Normal View History

2022-09-14 00:15:37 +02:00
from sensors.people_counter import PeopleCounter
2021-10-07 12:33:20 +02:00
import logging
from setup import sensor
2021-10-07 12:33:20 +02:00
counter = PeopleCounter(sensor)
2021-10-07 12:33:20 +02:00
peopleCount = 0
def countChange(change: int) -> None:
global peopleCount
peopleCount += change
2022-09-14 00:15:37 +02:00
logging.info(f"People count change to: {peopleCount}")
2021-10-07 12:33:20 +02:00
counter.hookCounting(countChange)
counter.run()