diff --git a/src/sensors/vl53l1x_sensor.py b/src/sensors/vl53l1x_sensor.py index 487d724..89d1843 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) -> None: + def open(self, ranging_mode: int = 2) -> None: self.sensor = VL53L1X.VL53L1X(i2c_bus=1, i2c_address=0x29) self.sensor.open() @@ -32,7 +32,7 @@ class VL53L1XSensor(ToFSensor): # If you uncomment the line below to set a budget you # should use `tof.start_ranging(0)` # tof.set_timing(66000, 70) - self.ranging = 2 + self.ranging = ranging_mode # 0 = Unchanged # 1 = Short Range # 2 = Medium Range