2021-09-24 02:36 AM
Greetings - within the "Example_9_detection_thresholds.c" , there a comment (line 164) stating:
"... Please note that the
first one must always be set with a mathematic_operation
VL53L5CX_OPERATION_NONE...."
Yet, within "vl53l5cx_plugin_detection_thresholds.h" it states (line 120):
"...Please note that the first checker MUST always be a OR
operation...."
Base on the example code is working, I assume the first is correct?
Q2 - Single 4x4 threshold: To validate what I'm testing is correct, for single a 4x4 threshold would look something like this:
for (uint8_t i = 0; i < 16; i++) {
thresholds[i].zone_num = i;
thresholds[i].measurement = VL53L5CX_DISTANCE_MM;
thresholds[i].type = VL53L5CX_IN_WINDOW;
thresholds[i].mathematic_operation = VL53L5CX_OPERATION_NONE;
thresholds[i].param_low_thresh = 400;
thresholds[i].param_high_thresh = 800;
}
thresholds[15].zone_num = VL53L5CX_LAST_THRESHOLD | thresholds[15].zone_num;
TIA,
-Terry
Solved! Go to Solution.
2021-10-11 09:56 AM
Turns out the OR and the NONE are both defined as '0', so both are correct and it is the documentation that is confusing.
Thanks for the post.
I'll get someone to update the documentation.
2021-10-11 09:56 AM
Turns out the OR and the NONE are both defined as '0', so both are correct and it is the documentation that is confusing.
Thanks for the post.
I'll get someone to update the documentation.
2021-10-11 11:18 AM
Thank you for the clarification!
-Terry