ToF sensor code by Pololu translated from Arduino to mbed
Diff: VL53L1X.h
- Revision:
- 4:cbf407c53998
- Parent:
- 2:bb0cd79ef201
diff -r 20f0c879da8c -r cbf407c53998 VL53L1X.h --- a/VL53L1X.h Wed Aug 01 18:42:33 2018 +0000 +++ b/VL53L1X.h Wed Aug 01 18:45:48 2018 +0000 @@ -1372,10 +1372,10 @@ DistanceMode distance_mode; // Record the current time to check an upcoming timeout against - void startTimeout() { timeout_start_ms = t.read()/10000; } + void startTimeout() { timeout_start_ms = t.read()*1000; } // Check if timeout is enabled (set to nonzero value) and has expired - bool checkTimeoutExpired() {return (io_timeout > 0) && ((uint16_t)(t.read()/10000 - timeout_start_ms) > io_timeout); } + bool checkTimeoutExpired() {return (io_timeout > 0) && ((uint16_t)(t.read()*1000 - timeout_start_ms) > io_timeout); } void setupManualCalibration(); void readResults();