24 #include "generated/airframe.h"
32 #include "pprzlink/messages.h"
40 #define SONAR_OFFSET 0
47 #define SONAR_SCALE 0.0166
82 #ifdef SENSOR_SYNC_SEND_SONAR
Main include for ABI (AirBorneInterface).
arch independent ADC (Analog to Digital Converter) API
#define DEFAULT_AV_NB_SAMPLE
Generic interface for all ADC hardware drivers, independent from microcontroller architecture.
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.
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
Common code for AP and FBW telemetry.
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
static struct adc_buf sonar_adc_buf
void sonar_adc_init(void)
struct SonarAdc sonar_adc
#define SONAR_SCALE
Sonar scale.
void sonar_adc_read(void)
Read ADC value to update sonar measurement.
#define SONAR_OFFSET
Sonar offset.
simple driver to deal with one sonar sensor on ADC
uint16_t offset
Sonar offset in ADC units.
uint16_t meas
Raw ADC value.
float distance
Distance measured in meters.
API to get/set the generic vehicle states.
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.