Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
baro_ets.h
Go to the documentation of this file.
1 /*
2  * Driver for the EagleTree Systems Altitude Sensor
3  * Has only been tested with V3 of the sensor hardware
4  *
5  * Notes:
6  * Connect directly to TWOG/Tiny I2C port. Multiple sensors can be chained together.
7  * Sensor should be in the proprietary mode (default) and not in 3rd party mode.
8  * Pitch gains may need to be updated.
9  *
10  *
11  * Sensor module wire assignments:
12  * Red wire: 5V
13  * White wire: Ground
14  * Yellow wire: SDA
15  * Brown wire: SCL
16  *
17  * Copyright (C) 2009 Vassilis Varveropoulos
18  * Copyright (C) 2010 The Paparazzi Team
19  *
20  * This file is part of paparazzi.
21  *
22  * paparazzi is free software; you can redistribute it and/or modify
23  * it under the terms of the GNU General Public License as published by
24  * the Free Software Foundation; either version 2, or (at your option)
25  * any later version.
26  *
27  * paparazzi is distributed in the hope that it will be useful,
28  * but WITHOUT ANY WARRANTY; without even the implied warranty of
29  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30  * GNU General Public License for more details.
31  *
32  * You should have received a copy of the GNU General Public License
33  * along with paparazzi; see the file COPYING. If not, write to
34  * the Free Software Foundation, 59 Temple Place - Suite 330,
35  * Boston, MA 02111-1307, USA.
36  */
37 
38 #ifndef BARO_ETS_H
39 #define BARO_ETS_H
40 
41 #include "std.h"
42 #include "mcu_periph/i2c.h"
43 
44 #define BARO_ETS_DT 0.05
45 
46 extern uint16_t baro_ets_adc;
48 extern bool_t baro_ets_valid;
49 extern bool_t baro_ets_updated;
50 extern bool_t baro_ets_enabled;
51 extern float baro_ets_altitude;
52 extern float baro_ets_r;
53 extern float baro_ets_sigma2;
54 
56 
57 extern void baro_ets_init( void );
58 extern void baro_ets_read_periodic( void );
59 extern void baro_ets_read_event( void );
60 
61 #define BaroEtsEvent() { if (baro_ets_i2c_trans.status == I2CTransSuccess) baro_ets_read_event(); }
62 
63 #endif // BARO_ETS_H
unsigned short uint16_t
Definition: types.h:16
bool_t baro_ets_enabled
Definition: baro_ets.c:70
float baro_ets_sigma2
Definition: baro_ets.c:72
void baro_ets_init(void)
Definition: baro_ets.c:81
void baro_ets_read_event(void)
Definition: baro_ets.c:121
bool_t baro_ets_valid
Definition: baro_ets.c:68
float baro_ets_altitude
Definition: baro_ets.c:69
void baro_ets_read_periodic(void)
Definition: baro_ets.c:96
uint16_t baro_ets_adc
Definition: baro_ets.c:66
bool_t baro_ets_updated
struct i2c_transaction baro_ets_i2c_trans
Definition: baro_ets.c:74
float baro_ets_r
Definition: baro_ets.c:71
uint16_t baro_ets_offset
Definition: baro_ets.c:67