Hi @Grahldg ,
I was testing ROI functions and I've noticed a small bug in the conversions (lines 311 and 313) from getUserRoi().
roi->topLeftY = (2 * row - height) >> 1; roi->bottomRightY = (2 * row + height) >> 1;
Checked the equivalent function within the API (file vl53l1_api.c), so the lines mentionned above should be as following:
roi->topLeftY = (2 * row + height) >> 1; roi->bottomRightY = (2 * row - height) >> 1;
Cheers,
https://github.com/sparkfun/SparkFun_VL53L1X_Arduino_Library/blob/4e22e49ac85ce94c1a76c695537574ea745b2f21/src/SparkFun_VL53L1X_Arduino_Library.cpp#L291
Hi @Grahldg , I was testing ROI functions and I've noticed a small bug in the conversions (lines 311 and 313) from getUserRoi().
roi->topLeftY = (2 * row - height) >> 1; roi->bottomRightY = (2 * row + height) >> 1;
Checked the equivalent function within the API (file vl53l1_api.c), so the lines mentionned above should be as following:
roi->topLeftY = (2 * row + height) >> 1; roi->bottomRightY = (2 * row - height) >> 1;
Cheers,