21 #ifndef CH_RANGEFINDER_H_
22 #define CH_RANGEFINDER_H_
33 #define CH101_COMMON_NUM_THRESHOLDS (6)
34 #define CHX01_COMMON_NUM_THRESHOLDS (6)
40 uint16_t ch_rangefinder_get_amplitude(
ch_dev_t *dev_ptr);
42 uint8_t ch_rangefinder_set_static_range(
ch_dev_t *dev_ptr, uint16_t samples);
47 uint8_t ch_rangefinder_set_rx_holdoff(
ch_dev_t *dev_ptr, uint16_t rx_holdoff);
48 uint16_t ch_rangefinder_get_rx_holdoff(
ch_dev_t *dev_ptr);
51 uint32_t ch_rangefinder_get_target_range(
ch_dev_t *dev_ptr, uint8_t target_num,
ch_range_t range_type);
339 uint8_t ch_rangefinder_display_config_info(
ch_dev_t *dev_ptr);
uint16_t ch_get_threshold(ch_dev_t *dev_ptr, uint8_t threshold_index)
Get the detection threshold.
Definition: ch_rangefinder.c:411
uint8_t ch_get_num_targets(ch_dev_t *dev_ptr)
Get the number of targets detected in last measurement.
Definition: ch_rangefinder.c:354
uint8_t ch_set_threshold(ch_dev_t *dev_ptr, uint8_t threshold_index, uint16_t amplitude)
Set the detection threshold.
Definition: ch_rangefinder.c:399
uint32_t ch_get_target_range(ch_dev_t *dev_ptr, uint8_t target_num, ch_range_t range_type)
Get the range to a specific target detected in last measurement.
Definition: ch_rangefinder.c:365
uint16_t ch_get_target_amplitude(ch_dev_t *dev_ptr, uint8_t target_num)
Get the amplitude for a specific target detected in last measurement.
Definition: ch_rangefinder.c:369
uint16_t ch_get_static_range(const ch_dev_t *dev_ptr)
Get static target rejection range setting.
Definition: ch_rangefinder.c:301
uint8_t ch_is_target_in_ringdown(ch_dev_t *dev_ptr)
Return if a target is detected near sensor (in the ringdown)
Definition: ch_rangefinder.c:390
uint8_t ch_set_thresholds(ch_dev_t *dev_ptr, ch_thresholds_t *thresh_ptr)
Set detection thresholds.
Definition: ch_rangefinder.c:423
uint32_t ch_get_tof_us(ch_dev_t *dev_ptr)
Get the measured time-of-flight from a sensor in microseconds.
Definition: ch_rangefinder.c:342
uint32_t ch_get_target_tof_us(ch_dev_t *dev_ptr, uint8_t target_num)
Get the measured time-of-flight for a specific target in microseconds.
Definition: ch_rangefinder.c:379
uint8_t ch_get_thresholds(ch_dev_t *dev_ptr, ch_thresholds_t *thresh_ptr)
Get detection thresholds.
Definition: ch_rangefinder.c:436
uint8_t ch_set_static_range(ch_dev_t *dev_ptr, uint16_t num_samples)
Configure static target rejection.
Definition: ch_rangefinder.c:306
uint8_t ch_get_num_thresholds(const ch_dev_t *dev_ptr)
Get number of detection thresholds.
Definition: ch_rangefinder.c:449
Internal driver types for operation with the Chirp ultrasonic sensor.
SonicLib public API and support functions for TDK/InvenSense ultrasonic sensors (originally developed...
ch_range_t
Range data types.
Definition: soniclib.h:218
Chirp sensor device descriptor structure.
Definition: soniclib.h:732
Algorithm configuration.
Definition: ch_rangefinder_types.h:67
Multiple detection threshold structure.
Definition: ch_rangefinder_types.h:42