|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
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)."
44 #ifndef SITL // Use ADC if not in simulation
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
static void stateSetAirspeed_f(float airspeed)
Set airspeed (float).
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.
void airspeed_adc_update(void)
arch independent ADC (Analog to Digital Converter) API
struct AirspeedAdc airspeed_adc
#define ADC_CHANNEL_AIRSPEED_NB_SAMPLES
void airspeed_adc_init(void)
static struct adc_buf buf_airspeed
float scale
used as quadratic scale if AIRSPEED_ADC_QUADRATIC_SCALE, otherwise linear
Generic interface for all ADC hardware drivers, independent from microcontroller architecture.