2024-10-07 01:20 PM - last edited on 2024-10-07 01:34 PM by Andrew Neil
In the 53L5A1 Board Support Package (BSP) for the VL53L5A1 Multi-Sensor Ranging module, setting the target order (e.g., VL53L5CX_TARGET_ORDER_STRONGEST or VL53L5CX_TARGET_ORDER_CLOSEST) doesn't seem to be directly exposed through the existing BSP functions.
The vl53l5cx_set_target_order() function in the vl53l5cx_api.h (from the VL53L5CX API) uses a different configuration structure (VL53L5CX_Configuration) compared to the structure used in the 53L5A1 BSP.
Is there any guidance, documentation, or example code available on how to create a wrapper function to bridge these APIs and control the target order and detection thresholds for each individual ToF sensor within the multi-sensor ranging module?
2024-10-07 01:38 PM
You don't see a:
uint8_t vl53l5cx_set_target_order(
VL53L5CX_Configuration *p_dev,
uint8_t target_order)
function in the vl53L5cx_api.c
Should be there.
But if you are using the XCode_ToF, the functions get abstracted.
That code tries to make a uniform interface even though the chips really are kind of different.
And that leaves some stuff out.
Your challenge is to figure out *p_dev is.
With that you can call the functions in the API directly instead of going through the BSP.
- john