Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
meteo_stick.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Gautier Hattenberger
3  *
4  * This file is part of paparazzi
5 
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, see
18  * <http://www.gnu.org/licenses/>.
19  *
20  */
21 
43 #ifndef METEO_STICK_H
44 #define METEO_STICK_H
45 
46 #include "std.h"
47 #include "peripherals/ads1220.h"
48 
49 #ifndef USE_MS_EEPROM
50 #define USE_MS_EEPROM TRUE
51 #endif
52 
53 #if USE_MS_EEPROM
56 #endif
57 
59 struct MeteoStick {
60  struct Ads1220 pressure;
61  struct Ads1220 diff_pressure;
62  struct Ads1220 temperature;
68 #if USE_MS_EEPROM
69  struct Eeprom25AA256 eeprom;
70  Calibration_params calib;
71 #endif
73 };
74 
75 extern struct MeteoStick meteo_stick;
76 
78 extern void meteo_stick_init(void);
79 extern void meteo_stick_periodic(void);
80 extern void meteo_stick_event(void);
81 extern void meteo_stick_report(void);
82 
83 #endif
84 
Driver for the ADS1220 24-bits ADC from TI SPI communication.
Driver for the eeprom 225AA256 (and 25LC256) 256K SPI bus serial EEPROM from Microchip.
25AA256 eeprom structure
Definition: eeprom25AA256.h:57
void meteo_stick_init(void)
Functions.
Definition: meteo_stick.c:300
struct MeteoStick meteo_stick
General structure.
Definition: meteo_stick.c:87
float current_pressure
calibrated pressure
Definition: meteo_stick.h:65
void meteo_stick_periodic(void)
Periodic function.
Definition: meteo_stick.c:377
uint32_t humidity_period
humidity (in ticks)
Definition: meteo_stick.h:63
struct Ads1220 temperature
temperature
Definition: meteo_stick.h:62
struct Ads1220 pressure
absolute pressure
Definition: meteo_stick.h:60
float current_temperature
calibrated temperature
Definition: meteo_stick.h:64
struct Ads1220 diff_pressure
differential pressure
Definition: meteo_stick.h:61
bool reset_dp_offset
reset differential pressure offset
Definition: meteo_stick.h:72
void meteo_stick_report(void)
Definition: meteo_stick.c:497
void meteo_stick_event(void)
Event function.
Definition: meteo_stick.c:434
float current_airspeed
calibrated airspeed
Definition: meteo_stick.h:67
float current_humidity
calibrated humidity
Definition: meteo_stick.h:66
Raw sensors structure.
Definition: meteo_stick.h:59
Parser for calibration data coming from 25AA256 EEPROM of the Meteo Stick.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
Definition: vl53l1_types.h:78