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

Error in read distance example #28

Closed DanRosenfeld closed 5 years ago

DanRosenfeld commented 5 years ago

Pretty sure the following line in the ReadDistance example

if (distanceSensor.begin() == true)

should read

if (distanceSensor.begin() == false)

since begin() returns 0 on success.

AndyEngland521 commented 5 years ago

Nice catch @DanRosenfeld I think I'll change it to == 0 so it isn't as confusing

AndyEngland521 commented 5 years ago

Fixed in v1.1.6, Thanks!

DanRosenfeld commented 5 years ago

Super--glad to help.