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

If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.

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

If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.
TPhil.3
Associate

Thank you for the clarification!

-Terry