pololu / vl53l0x-arduino

Pololu Arduino library for VL53L0X time-of-flight distance sensor
https://www.pololu.com/product/2490
Other
345 stars 163 forks source link

Fix rare, intermittent, endless loop in timeouts #31

Closed Tarim8 closed 5 years ago

Tarim8 commented 5 years ago

Don't reduce millis() and timeout_start_ms to 16 bit as this causes wrapping every 65 seconds which can lead to endless loops from checkTimeoutExpired() if the sensor times out when the 16 bit millis() is within io_timeout of wrapping.