Closed markkamp closed 7 months 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))
print("Distance: {} cm".format(vl53.distance))
print("Status: {:3d} Distance: {:6.2f}cm, Estimated noise: {:6.2f}cm".format(vl53.range_status, vl53.distance, vl53.sigma))
I added a new commit that renames those constants to use shorter names and remove the leading underscore.
The changes look good to me.
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))