2021-04-08 09:09 PM
VL53L1_PerformOffsetCalibration(Dev, 140, 17 << 16)
From digging in the code it looks like CalReflectancePerCent is fixpoint1616 and CalDistanceMilliMeter is an int32. For example is this the correct format to calibrate with a 17% Grey card at 140mm?
Solved! Go to Solution.
2021-04-09 09:23 AM
I would have said no, that clearly makes no sense.
But I'd be wrong.
Looking through some example code, I saw:
Status = VL53L1_PerformOffsetCalibration(Dev, 600,
(FixPoint1616_t)(5 * 65536));
which clearly is an example of your <<16.
I have no idea how someone could have created such a trap.
But they clearly did.
Nice catch.
2021-04-09 09:23 AM
I would have said no, that clearly makes no sense.
But I'd be wrong.
Looking through some example code, I saw:
Status = VL53L1_PerformOffsetCalibration(Dev, 600,
(FixPoint1616_t)(5 * 65536));
which clearly is an example of your <<16.
I have no idea how someone could have created such a trap.
But they clearly did.
Nice catch.
2021-04-09 09:43 AM
Thanks John, I appreciate the quick replies.