Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/meteo/mf_ptu.h"
#include "mcu_periph/gpio.h"
#include "mcu_periph/adc.h"
#include "mcu_periph/pwm_input.h"
#include "generated/airframe.h"
Go to the source code of this file.
Macros | |
#define | PTU_PRESSURE_OFFSET 0 |
Default scale and offset send raw values if nothing defined in airframe file. More... | |
#define | PTU_PRESSURE_SCALE 1.0 |
#define | PTU_TEMPERATURE_OFFSET 0 |
#define | PTU_TEMPERATURE_SCALE 1.0 |
#define | PTU_HUMIDTY_OFFSET 0 |
#define | PTU_HUMIDTY_SCALE 1.0 |
#define | ADC_CHANNEL_PTU_NB_SAMPLES DEFAULT_AV_NB_SAMPLE |
ADC buffers. More... | |
Functions | |
void | mf_ptu_init (void) |
Data acquisition module for Meteo France PTU board. More... | |
void | mf_ptu_periodic (void) |
Variables | |
struct adc_buf | pressure_buf |
struct adc_buf | temp_buf |
uint16_t | pressure_adc |
Raw values. More... | |
uint16_t | temp_adc |
uint32_t | humid_period |
#define ADC_CHANNEL_PTU_NB_SAMPLES DEFAULT_AV_NB_SAMPLE |
#define PTU_HUMIDTY_OFFSET 0 |
Definition at line 46 of file mf_ptu.c.
Referenced by mf_ptu_periodic().
#define PTU_HUMIDTY_SCALE 1.0 |
Definition at line 49 of file mf_ptu.c.
Referenced by mf_ptu_periodic().
#define PTU_PRESSURE_OFFSET 0 |
Default scale and offset send raw values if nothing defined in airframe file.
Definition at line 34 of file mf_ptu.c.
Referenced by mf_ptu_periodic().
#define PTU_PRESSURE_SCALE 1.0 |
Definition at line 37 of file mf_ptu.c.
Referenced by mf_ptu_periodic().
#define PTU_TEMPERATURE_OFFSET 0 |
Definition at line 40 of file mf_ptu.c.
Referenced by mf_ptu_periodic().
#define PTU_TEMPERATURE_SCALE 1.0 |
Definition at line 43 of file mf_ptu.c.
Referenced by mf_ptu_periodic().
void mf_ptu_init | ( | void | ) |
Data acquisition module for Meteo France PTU board.
Definition at line 77 of file mf_ptu.c.
References adc_buf_channel(), ADC_CHANNEL_PTU_NB_SAMPLES, FALSE, gpio_set(), gpio_setup_output(), humid_period, pressure_adc, pressure_buf, temp_adc, and temp_buf.
void mf_ptu_periodic | ( | void | ) |
Definition at line 96 of file mf_ptu.c.
References adc_buf::av_nb_sample, GpsState::course, DefaultChannel, DefaultDevice, GpsState::fix, gps, GpsState::gspeed, GpsState::hmsl, humid_period, LlaCoor_i::lat, GpsState::lla_pos, LlaCoor_i::lon, GpsState::ned_vel, pressure_adc, pressure_buf, PTU_HUMIDTY_OFFSET, PTU_HUMIDTY_SCALE, PTU_PRESSURE_OFFSET, PTU_PRESSURE_SCALE, PTU_TEMPERATURE_OFFSET, PTU_TEMPERATURE_SCALE, pwm_input_period_tics, adc_buf::sum, temp_adc, temp_buf, GpsState::tow, TRUE, GpsState::week, and NedCoor_i::z.
uint32_t humid_period |
Definition at line 62 of file mf_ptu.c.
Referenced by mf_ptu_init(), and mf_ptu_periodic().
uint16_t pressure_adc |
Raw values.
Definition at line 60 of file mf_ptu.c.
Referenced by mf_ptu_init(), and mf_ptu_periodic().
struct adc_buf pressure_buf |
Definition at line 56 of file mf_ptu.c.
Referenced by mf_ptu_init(), and mf_ptu_periodic().
uint16_t temp_adc |
Definition at line 61 of file mf_ptu.c.
Referenced by mf_ptu_init(), and mf_ptu_periodic().
struct adc_buf temp_buf |
Definition at line 57 of file mf_ptu.c.
Referenced by mf_ptu_init(), and mf_ptu_periodic().