AFBR-S50 API Reference Manual v1.5.6
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
|
Device calibration parameter definitions and API functions. More...
Data Structures | |
union | argus_cal_offset_table_t |
Pixel Range Offset Table. More... | |
struct | xtalk_t |
Pixel Crosstalk Compensation Vector. More... | |
union | argus_cal_xtalk_table_t |
Pixel Crosstalk Vector Table. More... | |
struct | argus_cal_electrical_p2pxtalk_t |
Electrical Pixel-To-Pixel Crosstalk Compensation Parameters. More... | |
struct | argus_cal_optical_p2pxtalk_t |
Optical Pixel-To-Pixel Crosstalk Compensation Parameters. More... | |
struct | argus_cal_p2pxtalk_t |
Pixel-To-Pixel Crosstalk Compensation Parameters. More... | |
Functions | |
status_t | Argus_SetCalibrationGlobalRangeOffsets (argus_hnd_t *hnd, q0_15_t offset_low, q0_15_t offset_high) |
Sets the global range offset values to a specified device. | |
status_t | Argus_GetCalibrationGlobalRangeOffsets (argus_hnd_t *hnd, q0_15_t *offset_low, q0_15_t *offset_high) |
Gets the global range offset values from a specified device. | |
status_t | Argus_SetCalibrationPixelRangeOffsets (argus_hnd_t *hnd, argus_cal_offset_table_t const *value) |
Sets the relative pixel offset table to a specified device. | |
status_t | Argus_GetCalibrationPixelRangeOffsets (argus_hnd_t *hnd, argus_cal_offset_table_t *value) |
Gets the relative pixel offset table from a specified device. | |
status_t | Argus_ResetCalibrationPixelRangeOffsets (argus_hnd_t *hnd) |
Resets the relative pixel offset values for the specified device to the factory calibrated default values. | |
void | Argus_GetPixelRangeOffsets_Callback (argus_cal_offset_table_t *offsets, argus_mode_t const mode) |
A callback that returns the external pixel range offsets. | |
status_t | Argus_SetCalibrationRangeOffsetSequenceSampleTime (argus_hnd_t *hnd, uint16_t value) |
Sets the sample time for the range offset calibration sequence. | |
status_t | Argus_GetCalibrationRangeOffsetSequenceSampleTime (argus_hnd_t *hnd, uint16_t *value) |
Gets the sample time for the range offset calibration sequence. | |
status_t | Argus_SetCalibrationCrosstalkPixel2Pixel (argus_hnd_t *hnd, argus_cal_p2pxtalk_t const *value) |
Sets the pixel-to-pixel crosstalk compensation parameters to a specified device. | |
status_t | Argus_GetCalibrationCrosstalkPixel2Pixel (argus_hnd_t *hnd, argus_cal_p2pxtalk_t *value) |
Gets the pixel-to-pixel crosstalk compensation parameters from a specified device. | |
status_t | Argus_SetCalibrationCrosstalkVectorTable (argus_hnd_t *hnd, argus_cal_xtalk_table_t const *value) |
Sets the custom crosstalk vector table to a specified device. | |
status_t | Argus_GetCalibrationCrosstalkVectorTable (argus_hnd_t *hnd, argus_cal_xtalk_table_t *value) |
Gets the custom crosstalk vector table from a specified device. | |
status_t | Argus_ResetCalibrationCrosstalkVectorTable (argus_hnd_t *hnd) |
Resets the crosstalk vector table for the specified device to the factory calibrated default values. | |
status_t | Argus_SetCalibrationCrosstalkSequenceSampleTime (argus_hnd_t *hnd, uint16_t value) |
Sets the sample time for the crosstalk calibration sequence. | |
status_t | Argus_GetCalibrationCrosstalkSequenceSampleTime (argus_hnd_t *hnd, uint16_t *value) |
Gets the sample time for the crosstalk calibration sequence. | |
status_t | Argus_SetCalibrationCrosstalkSequenceAmplitudeThreshold (argus_hnd_t *hnd, uq12_4_t value) |
Sets the max. amplitude threshold for the crosstalk calibration sequence. | |
status_t | Argus_GetCalibrationCrosstalkSequenceAmplitudeThreshold (argus_hnd_t *hnd, uq12_4_t *value) |
Gets the max. amplitude threshold for the crosstalk calibration sequence. | |
status_t | Argus_ClearUserCalibration (argus_hnd_t *hnd) |
Clears all user calibration values from NVM for the specified device. | |
void | Argus_GetCrosstalkVectorTable_Callback (argus_cal_xtalk_table_t *xtalk, argus_mode_t const mode) |
A callback that returns the external crosstalk vector table. | |
status_t | Argus_GetCalibrationGoldenPixel (argus_hnd_t const *hnd, uint8_t *x, uint8_t *y) |
Gets the currently calibrated Golden Pixel coordinates. | |
Device calibration parameter definitions and API functions.
The calibration concept of the Time-of-Flight measurement device is made up of three parts:
Calibration API
status_t Argus_ClearUserCalibration | ( | argus_hnd_t * | hnd | ) |
Clears all user calibration values from NVM for the specified device.
The user calibration values are stored in the non-volatile memory (NVM) if corresponding NVM hardware layer is implemented. This method clears the user calibration data from the non-volatile memory.
hnd | The API handle; contains all internal states and data. |
status_t Argus_GetCalibrationCrosstalkPixel2Pixel | ( | argus_hnd_t * | hnd, |
argus_cal_p2pxtalk_t * | value | ||
) |
status_t Argus_GetCalibrationCrosstalkSequenceAmplitudeThreshold | ( | argus_hnd_t * | hnd, |
uq12_4_t * | value | ||
) |
Gets the max. amplitude threshold for the crosstalk calibration sequence.
The maximum amplitude threshold defines a maximum crosstalk vector amplitude before causing an error message. If the crosstalk is too high, there is usually an issue with the measurement setup, i.e. there is still a measurement signal detected.
hnd | The API handle; contains all internal states and data. |
value | The current max. amplitude threshold value in UQ12.4 format. |
status_t Argus_GetCalibrationCrosstalkSequenceSampleTime | ( | argus_hnd_t * | hnd, |
uint16_t * | value | ||
) |
Gets the sample time for the crosstalk calibration sequence.
Gets the measurement sample acquisition time for executing the crosstalk calibration sequence and generate the crosstalk data.
Units: msec.
hnd | The API handle; contains all internal states and data. |
value | The current crosstalk calibration sequence sample time. |
status_t Argus_GetCalibrationCrosstalkVectorTable | ( | argus_hnd_t * | hnd, |
argus_cal_xtalk_table_t * | value | ||
) |
Gets the custom crosstalk vector table from a specified device.
The crosstalk vectors are subtracted from the raw sampling data in the data evaluation phase.
The crosstalk vector table is a three dimensional array of type xtalk_t. The argus_cal_xtalk_table_t is the corresponding typedef for the required data.
The dimensions are:
hnd | The API handle; contains all internal states and data. |
value | The current crosstalk vector table. |
status_t Argus_GetCalibrationGlobalRangeOffsets | ( | argus_hnd_t * | hnd, |
q0_15_t * | offset_low, | ||
q0_15_t * | offset_high | ||
) |
Gets the global range offset values from a specified device.
The global range offsets are subtracted from the raw range values. There are two distinct values that are applied in low or high power stage setting respectively.
hnd | The API handle; contains all internal states and data. |
offset_low | The current range offset for the low power stage in meter and Q0.15 format. |
offset_high | The current global range offset for the high power stage in meter and Q0.15 format. |
status_t Argus_GetCalibrationGoldenPixel | ( | argus_hnd_t const * | hnd, |
uint8_t * | x, | ||
uint8_t * | y | ||
) |
Gets the currently calibrated Golden Pixel coordinates.
The Golden Pixel is the pixel that is located at the center of the receiving light beam. Thus it it the one that receives the most signal and plays a central role in 1D measurement systems.
The function fills the provided x
and y
parameters with the Golden Pixel coordinates. Typical values are x = 5 and y = 1 or 2. But the actual values depend on the specific sensor.
Please also note the utility functions provided in the Pixel Channel Mapping module to convert between pixel coordinates and channel numbers or shift pixel maps by a position offset (ShiftSelectedPixels) or generate pixel masks centered around the Golden Pixel (FillPixelMask).
hnd | The API handle; contains all internal states and data. |
x | The Golden Pixel x-coordinate. |
y | The Golden Pixel y-coordinate. |
status_t Argus_GetCalibrationPixelRangeOffsets | ( | argus_hnd_t * | hnd, |
argus_cal_offset_table_t * | value | ||
) |
Gets the relative pixel offset table from a specified device.
The relative pixel offset values are subtracted from the raw range values for each individual pixel. Note that a global range offset is applied additionally. The relative pixel offset values are meant to be with respect to the average range of all pixels, i.e. the average of all relative offsets should be 0!
The crosstalk vector table is a two dimensional array of type q0_15_t, wrapped within the argus_cal_offset_table_t structure.
The dimensions are:
hnd | The API handle; contains all internal states and data. |
value | The current relative range offset in meter and Q0.15 format. |
status_t Argus_GetCalibrationRangeOffsetSequenceSampleTime | ( | argus_hnd_t * | hnd, |
uint16_t * | value | ||
) |
Gets the sample time for the range offset calibration sequence.
Gets the measurement sample acquisition time for executing the range offset calibration sequence and generate the offset data.
Units: msec.
hnd | The API handle; contains all internal states and data. |
value | The current range offset calibration sequence sample time. |
void Argus_GetCrosstalkVectorTable_Callback | ( | argus_cal_xtalk_table_t * | xtalk, |
argus_mode_t const | mode | ||
) |
A callback that returns the external crosstalk vector table.
The function needs to be implemented by the host application in order to set the external crosstalk vector table upon system initialization. If not defined in user code, the default implementation will return an all zero vector table, assuming there is no (additional) external crosstalk.
If defined in user code, the function must fill all vector values in the provided
Example usage:
xtalk | The crosstalk vector array; to be filled with data. |
mode | The current measurement mode. |
void Argus_GetPixelRangeOffsets_Callback | ( | argus_cal_offset_table_t * | offsets, |
argus_mode_t const | mode | ||
) |
A callback that returns the external pixel range offsets.
The function needs to be implemented by the host application in order to set the external pixel range offsets values upon system initialization. If not defined in user code, the default implementation will return an all zero offset table, assuming there is no (additional) external pixel range offset values.
If defined in user code, the function must fill all offset values in the provided
Example usage:
offsets | The pixel range offsets in meter and Q0.15 format; to be filled with data. |
mode | The current measurement mode. |
status_t Argus_ResetCalibrationCrosstalkVectorTable | ( | argus_hnd_t * | hnd | ) |
Resets the crosstalk vector table for the specified device to the factory calibrated default values.
The crosstalk vectors are subtracted from the raw sampling data in the data evaluation phase.
hnd | The API handle; contains all internal states and data. |
status_t Argus_ResetCalibrationPixelRangeOffsets | ( | argus_hnd_t * | hnd | ) |
Resets the relative pixel offset values for the specified device to the factory calibrated default values.
The relative pixel offset values are subtracted from the raw range values for each individual pixel. Note that a global range offset is applied additionally.
The factory defaults are device specific values.
hnd | The API handle; contains all internal states and data. |
status_t Argus_SetCalibrationCrosstalkPixel2Pixel | ( | argus_hnd_t * | hnd, |
argus_cal_p2pxtalk_t const * | value | ||
) |
status_t Argus_SetCalibrationCrosstalkSequenceAmplitudeThreshold | ( | argus_hnd_t * | hnd, |
uq12_4_t | value | ||
) |
Sets the max. amplitude threshold for the crosstalk calibration sequence.
The maximum amplitude threshold defines a maximum crosstalk vector amplitude before causing an error message. If the crosstalk is too high, there is usually an issue with the measurement setup, i.e. there is still a measurement signal detected.
hnd | The API handle; contains all internal states and data. |
value | The new crosstalk calibration sequence maximum amplitude threshold value in UQ12.4 format. |
status_t Argus_SetCalibrationCrosstalkSequenceSampleTime | ( | argus_hnd_t * | hnd, |
uint16_t | value | ||
) |
Sets the sample time for the crosstalk calibration sequence.
Sets the measurement sample acquisition time for executing the crosstalk calibration sequence and generate the crosstalk data.
Units: msec.
hnd | The API handle; contains all internal states and data. |
value | The new crosstalk calibration sequence sample time. |
status_t Argus_SetCalibrationCrosstalkVectorTable | ( | argus_hnd_t * | hnd, |
argus_cal_xtalk_table_t const * | value | ||
) |
Sets the custom crosstalk vector table to a specified device.
The crosstalk vectors are subtracted from the raw sampling data in the data evaluation phase.
The crosstalk vector table is a three dimensional array of type xtalk_t. The argus_cal_xtalk_table_t is the corresponding typedef for the required data.
The dimensions are:
Its recommended to use the built-in crosstalk calibration sequence (see Argus_ExecuteXtalkCalibrationSequence) to determine the crosstalk vector table.
If a constant table for all device needs to be incorporated into the sources, the Argus_GetCrosstalkVectorTable_Callback should be used.
hnd | The API handle; contains all internal states and data. |
value | The new crosstalk vector table. |
status_t Argus_SetCalibrationGlobalRangeOffsets | ( | argus_hnd_t * | hnd, |
q0_15_t | offset_low, | ||
q0_15_t | offset_high | ||
) |
Sets the global range offset values to a specified device.
The global range offsets are subtracted from the raw range values. There are two distinct values that are applied in low or high power stage setting respectively.
hnd | The API handle; contains all internal states and data. |
offset_low | The new global range offset for the low power stage in meter and Q0.15 format. |
offset_high | The new global range offset for the high power stage in meter and Q0.15 format. |
status_t Argus_SetCalibrationPixelRangeOffsets | ( | argus_hnd_t * | hnd, |
argus_cal_offset_table_t const * | value | ||
) |
Sets the relative pixel offset table to a specified device.
The relative pixel offset values are subtracted from the raw range values for each individual pixel. Note that a global range offset is applied additionally. The relative pixel offset values are meant to be with respect to the average range of all pixels, i.e. the average of all relative offsets should be 0!
The crosstalk vector table is a two dimensional array of type q0_15_t, wrapped within the argus_cal_offset_table_t structure.
The dimensions are:
Its recommended to use the built-in pixel offset calibration sequence (see Argus_ExecuteRelativeRangeOffsetCalibrationSequence) to determine the offset table for the current device.
If a constant offset table for all device needs to be incorporated into the sources, the Argus_GetPixelRangeOffsets_Callback should be used.
hnd | The API handle; contains all internal states and data. |
value | The new relative range offset in meter and Q0.15 format. |
status_t Argus_SetCalibrationRangeOffsetSequenceSampleTime | ( | argus_hnd_t * | hnd, |
uint16_t | value | ||
) |
Sets the sample time for the range offset calibration sequence.
Gets the measurement sample acquisition time for executing the range offset calibration sequence and generate the offset data.
Units: msec.
hnd | The API handle; contains all internal states and data. |
value | The new range offset calibration sequence sample time. |