MRMS
Macros | Functions
VL53L1X_calibration.c File Reference

Calibration functions implementation. More...

#include "VL53L1X_api.h"
#include "VL53L1X_calibration.h"

Macros

#define ALGO__PART_TO_PART_RANGE_OFFSET_MM   0x001E
 
#define MM_CONFIG__INNER_OFFSET_MM   0x0020
 
#define MM_CONFIG__OUTER_OFFSET_MM   0x0022
 

Functions

int8_t VL53L1X_CalibrateOffset (uint16_t dev, uint16_t TargetDistInMm, int16_t *offset)
 This function performs the offset calibration.
The function returns the offset value found and programs the offset compensation into the device. More...
 
int8_t VL53L1X_CalibrateXtalk (uint16_t dev, uint16_t TargetDistInMm, uint16_t *xtalk)
 This function performs the xtalk calibration.
The function returns the xtalk value found and programs the xtalk compensation to the device. More...
 

Detailed Description

Calibration functions implementation.

Function Documentation

◆ VL53L1X_CalibrateOffset()

int8_t VL53L1X_CalibrateOffset ( uint16_t  dev,
uint16_t  TargetDistInMm,
int16_t offset 
)

This function performs the offset calibration.
The function returns the offset value found and programs the offset compensation into the device.

Parameters
TargetDistInMmtarget distance in mm, ST recommended 100 mm Target reflectance = grey17%
Returns
0:success, !=0: failed
offset pointer contains the offset found in mm

◆ VL53L1X_CalibrateXtalk()

int8_t VL53L1X_CalibrateXtalk ( uint16_t  dev,
uint16_t  TargetDistInMm,
uint16_t xtalk 
)

This function performs the xtalk calibration.
The function returns the xtalk value found and programs the xtalk compensation to the device.

Parameters
TargetDistInMmtarget distance in mm
The target distance : the distance where the sensor start to "under range"
due to the influence of the photons reflected back from the cover glass becoming strong
It's also called inflection point
Target reflectance = grey 17%
Returns
0: success, !=0: failed
xtalk pointer contains the xtalk value found in cps (number of photons in count per second)