29#include "generated/airframe.h"
33#include "generated/modules.h"
35#ifndef USE_AIRSPEED_ADC
36#define USE_AIRSPEED_ADC TRUE
40#if !defined AIRSPEED_ADC_QUADRATIC_SCALE && !defined AIRSPEED_ADC_SCALE
41#error "You need to define either AIRSPEED_ADC_QUADRATIC_SCALE or AIRSPEED_ADC_SCALE (linear)."
48#ifndef ADC_CHANNEL_AIRSPEED
49#error "ADC_CHANNEL_AIRSPEED needs to be defined to use airspeed_adc module"
52#ifndef ADC_CHANNEL_AIRSPEED_NB_SAMPLES
53#define ADC_CHANNEL_AIRSPEED_NB_SAMPLES DEFAULT_AV_NB_SAMPLE
64#ifdef AIRSPEED_ADC_QUADRATIC_SCALE
80#ifdef AIRSPEED_ADC_QUADRATIC_SCALE
87 extern float sim_air_speed;
Main include for ABI (AirBorneInterface).
arch independent ADC (Analog to Digital Converter) API
static uint16_t adc_buf_get(struct adc_buf *s)
Get filtered value from buffer.
Generic interface for all ADC hardware drivers, independent from microcontroller architecture.
struct AirspeedAdc airspeed_adc
static struct adc_buf buf_airspeed
void airspeed_adc_update(void)
#define ADC_CHANNEL_AIRSPEED_NB_SAMPLES
void airspeed_adc_init(void)
Read an airspeed or differential pressure sensor via onboard ADC.
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.
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
API to get/set the generic vehicle states.
Architecture independent timing functions.