diff --git a/src/sensors/people_counter.py b/src/sensors/people_counter.py index 502b436..bcd49e7 100644 --- a/src/sensors/people_counter.py +++ b/src/sensors/people_counter.py @@ -13,10 +13,10 @@ END_DISTANCE = "end_distance" class PeopleCounter: - def __init__(self, sensor: ToFSensor) -> None: + def __init__(self, sensor: ToFSensor, maxTriggerDistanceInCm: int = 90) -> None: self.sensor = sensor self.callbacks = {COUNTING_CB: [], TRIGGER_CB: [], CHANGE_CB: []} - self.maxTriggerDistance = 120 # In cm + self.maxTriggerDistance = maxTriggerDistanceInCm def hookCounting(self, cb) -> None: self.callbacks[COUNTING_CB].append(cb) diff --git a/src/sensors/vl53l1x_sensor.py b/src/sensors/vl53l1x_sensor.py index a43e033..20686ae 100644 --- a/src/sensors/vl53l1x_sensor.py +++ b/src/sensors/vl53l1x_sensor.py @@ -22,7 +22,7 @@ class VL53L1XSensor(ToFSensor): def __init__(self) -> None: super().__init__() - def open(self, ranging_mode: int = 2) -> None: + def open(self, ranging_mode: int = 3) -> None: self.sensor = VL53L1X.VL53L1X(i2c_bus=1, i2c_address=0x29) self.sensor.open() self.roi = VL53L1X.VL53L1xUserRoi()