File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -553,7 +553,7 @@ def do_range_measurement(self):
553
553
):
554
554
raise RuntimeError ("Timeout waiting for VL53L0X!" )
555
555
556
- def read_range (self , max_ready_wait_us = None ):
556
+ def read_range (self , max_ready_wait_us = None ):
557
557
"""Return a range reading in millimeters.
558
558
559
559
If max_ready_wait_us is specified, and the sensor data is not ready
@@ -573,7 +573,10 @@ def read_range(self, max_ready_wait_us = None):
573
573
and (time .monotonic () - start ) >= self .io_timeout_s
574
574
):
575
575
raise RuntimeError ("Timeout waiting for VL53L0X!" )
576
- if max_ready_wait_us is not None and (time .monotonic () - start )* 1_000_000 >= max_ready_wait_us :
576
+ if (
577
+ max_ready_wait_us is not None
578
+ and (time .monotonic () - start ) * 1_000_000 >= max_ready_wait_us
579
+ ):
577
580
return - 1
578
581
# assumptions: Linearity Corrective Gain is 1000 (default)
579
582
# fractional ranging is not enabled
You can’t perform that action at this time.
0 commit comments