29 #include "generated/airframe.h"
33 #ifndef USE_AIRSPEED_ADC
34 #define USE_AIRSPEED_ADC TRUE
38 #if !defined AIRSPEED_ADC_QUADRATIC_SCALE && !defined AIRSPEED_ADC_SCALE
39 #error "You need to define either AIRSPEED_ADC_QUADRATIC_SCALE or AIRSPEED_ADC_SCALE (linear)."
46 #ifndef ADC_CHANNEL_AIRSPEED
47 #error "ADC_CHANNEL_AIRSPEED needs to be defined to use airspeed_adc module"
50 #ifndef ADC_CHANNEL_AIRSPEED_NB_SAMPLES
51 #define ADC_CHANNEL_AIRSPEED_NB_SAMPLES DEFAULT_AV_NB_SAMPLE
62 #ifdef AIRSPEED_ADC_QUADRATIC_SCALE
78 #ifdef AIRSPEED_ADC_QUADRATIC_SCALE
84 #elif !defined USE_NPS
85 extern float sim_air_speed;
Main include for ABI (AirBorneInterface).
arch independent ADC (Analog to Digital Converter) API
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.
float scale
used as quadratic scale if AIRSPEED_ADC_QUADRATIC_SCALE, otherwise linear
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 void stateSetAirspeed_f(uint16_t id, float airspeed)
Set airspeed (float).
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
API to get/set the generic vehicle states.