adafruit / Adafruit_CircuitPython_VL53L4CD

CircuitPython helper library for the VL53L4CD time of flight distance sensor.
MIT License
4 stars 6 forks source link

Measurement quality #9

Closed markkamp closed 7 months ago

markkamp commented 1 year ago

Added functions to check measurement quality. This helps determine if the value read is actually usable.

Tested with example vl53l4cd_simpletest.py replacing line: print("Distance: {} cm".format(vl53.distance)) by: print("Status: {:3d} Distance: {:6.2f}cm, Estimated noise: {:6.2f}cm".format(vl53.range_status, vl53.distance, vl53.sigma))

FoamyGuy commented 7 months ago

I added a new commit that renames those constants to use shorter names and remove the leading underscore.

The changes look good to me.