cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L5CX: Conflicting comments in ULD API and single 4x4 threshold

TPhil.3
Associate

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

1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

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.

  • john

Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'

View solution in original post

2 REPLIES 2
John E KVAM
ST Employee

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.

  • john

Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'
TPhil.3
Associate

Thank you for the clarification!

-Terry