sparkfun / SparkFun_VL53L1X_Arduino_Library

A library for the laser based VL53L1X Time Of Flight distance sensor capable of detecting a target 4m away!
MIT License
88 stars 50 forks source link

exit VL53L1X_SensorInit() after timeout if no sensor / sensor doesn't work #29

Closed zwerfl closed 4 years ago

zwerfl commented 5 years ago

if there is no sensor connected the initialisation gets stuck in the while-loop inside of VL53L1X_ERROR VL53L1X::VL53L1X_SensorInit(); proposal is to add a timeout, so that the init() function returns to the calling program with a defined error code after a second or so

AndyEngland521 commented 4 years ago

Added feature in v1.2.3, thanks @zwerfl

zwerfl commented 4 years ago

@ AndyEngland521: thanks for considering, and more important: many thanks for developing and providing this great lib!!!