24 #include "generated/airframe.h"
32 #include "pprzlink/messages.h"
40 #define SONAR_OFFSET 0
47 #define SONAR_SCALE 0.0166
81 #ifdef SENSOR_SYNC_SEND_SONAR
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
float distance
Distance measured in meters.
Main include for ABI (AirBorneInterface).
uint16_t meas
Raw ADC value.
void adc_buf_channel(uint8_t adc_channel, struct adc_buf *s, uint8_t av_nb_sample)
Link between ChibiOS ADC drivers and Paparazzi adc_buffers.
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
void sonar_adc_read(void)
Read ADC value to update sonar measurement.
arch independent ADC (Analog to Digital Converter) API
Generic interface for all ADC hardware drivers, independent from microcontroller architecture.
void sonar_adc_init(void)
struct SonarAdc sonar_adc
static struct adc_buf sonar_adc_buf
#define SONAR_SCALE
Sonar scale.
#define DefaultChannel
SITL.
API to get/set the generic vehicle states.
simple driver to deal with one sonar sensor on ADC
Common code for AP and FBW telemetry.
#define DEFAULT_AV_NB_SAMPLE
#define SONAR_OFFSET
Sonar offset.
uint16_t offset
Sonar offset in ADC units.