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

16 lines
336 B
Python

from sensors.people_counter import PeopleCounter
import logging
from setup import sensor
counter = PeopleCounter(sensor)
peopleCount = 0
def countChange(change: int) -> None:
global peopleCount
peopleCount += change
logging.info(f"People count change to: {peopleCount}")
counter.hookCounting(countChange)
counter.run()