cancel
Showing results for 
Search instead for 
Did you mean: 

Clarification about OPERATION constants in VL53L8CX ULD

PGibs.1
Associate II

Hi, just wondering if these constants (specifically NONE and OR both being 0) in the ULD for VL53L8CX are correct

#define VL53L8CX_OPERATION_NONE				((uint8_t)0U)
#define VL53L8CX_OPERATION_OR				((uint8_t)0U)
#define VL53L8CX_OPERATION_AND				((uint8_t)2U)

 it look like it should be a sequence (0, 1, 2) so the repeated (0, 0, 2) appears out of place. It's hard to tell from the examples if this is intentional though.

1 ACCEPTED SOLUTION

Accepted Solutions

Yes, the values are correct, there is no #define for 1.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
PGibs.1
Associate II

It looks like the VL53L5CX has the same values

Zhiyuan.Han
ST Employee

Hi 

 

VL53L8CX interrupt thresholds could be set as below conditions.

• Resolution 4x4: using 1 threshold per zone (total of 16 thresholds)
• Resolution 4x4: using 2 thresholds per zone (total of 32 thresholds)
• Resolution 8x8: using 1 threshold per zone (total of 64 thresholds)

The interrupt function also support mathematic operation, but it works only for 4x4 – 2 threshold combinations per zone. The user can set a combination using several thresholds in one zone.  you should set mathematic_operation as either OR or AND. 

  • thresholds[2*i].mathematic_operation = VL53LCX_OPERATION_OR;
  • thresholds[2*i+1].mathematic_operation = VL53LCX_OPERATION_AND;

But for the 1st and 3rd trig method, it doesn't support mathematic operation, but the structure parameter mathematic_operation you need to initialize, here you should set NONE  

  • thresholds[i].mathematic_operation = VL53LCX_OPERATION_NONE;

 

Br

Zhiyuan.Han


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
PGibs.1
Associate II

Are the values correct? Both VL53L8CX_OPERATION_NONE and VL53L8CX_OPERATION_OR are supposed to be zero, and VL53L8CX_OPERATION_AND is 2? And there is no corresponding #define for 1

Yes, the values are correct, there is no #define for 1.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.