Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
baro_ets.h File Reference

Driver for the EagleTree Systems Altitude Sensor. More...

#include "std.h"
#include "mcu_periph/i2c.h"
+ Include dependency graph for baro_ets.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BARO_ETS_DT   BARO_ETS_READ_PERIODIC_PERIOD
 new measurement every baro_ets_read_periodic More...
 
#define BaroEtsEvent()   { if (baro_ets_i2c_trans.status == I2CTransSuccess) baro_ets_read_event(); }
 
#define BaroEtsUpdate(_b, _h)   { if (baro_ets_valid) { _b = baro_ets_adc; _h(); baro_ets_valid = FALSE; } }
 

Functions

void baro_ets_init (void)
 
void baro_ets_read_periodic (void)
 
void baro_ets_read_event (void)
 

Variables

uint16_t baro_ets_adc
 
uint16_t baro_ets_offset
 
bool_t baro_ets_valid
 
bool_t baro_ets_updated
 
bool_t baro_ets_enabled
 
float baro_ets_altitude
 
float baro_ets_r
 
float baro_ets_sigma2
 
struct i2c_transaction baro_ets_i2c_trans
 

Detailed Description

Driver for the EagleTree Systems Altitude Sensor.

Has only been tested with V3 of the sensor hardware.

Notes: Connect directly to TWOG/Tiny I2C port. Multiple sensors can be chained together. Sensor should be in the proprietary mode (default) and not in 3rd party mode. Pitch gains may need to be updated.

Sensor module wire assignments: Red wire: 5V White wire: Ground Yellow wire: SDA Brown wire: SCL

Definition in file baro_ets.h.

Macro Definition Documentation

#define BARO_ETS_DT   BARO_ETS_READ_PERIODIC_PERIOD

new measurement every baro_ets_read_periodic

Definition at line 49 of file baro_ets.h.

Referenced by alt_kalman().

#define BaroEtsEvent ( )    { if (baro_ets_i2c_trans.status == I2CTransSuccess) baro_ets_read_event(); }

Definition at line 66 of file baro_ets.h.

#define BaroEtsUpdate (   _b,
  _h 
)    { if (baro_ets_valid) { _b = baro_ets_adc; _h(); baro_ets_valid = FALSE; } }

Definition at line 68 of file baro_ets.h.

Function Documentation

Variable Documentation

uint16_t baro_ets_adc

Definition at line 80 of file baro_ets.c.

Referenced by baro_ets_init(), baro_ets_read_event(), and baro_ets_read_periodic().

float baro_ets_altitude
bool_t baro_ets_enabled

Definition at line 84 of file baro_ets.c.

Referenced by alt_kalman(), and baro_ets_init().

struct i2c_transaction baro_ets_i2c_trans

Definition at line 88 of file baro_ets.c.

Referenced by baro_ets_init(), baro_ets_read_event(), and baro_ets_read_periodic().

uint16_t baro_ets_offset

Definition at line 81 of file baro_ets.c.

Referenced by baro_ets_init(), baro_ets_read_event(), and baro_ets_read_periodic().

float baro_ets_r

Definition at line 85 of file baro_ets.c.

Referenced by alt_kalman(), and baro_ets_init().

float baro_ets_sigma2

Definition at line 86 of file baro_ets.c.

Referenced by alt_kalman(), and baro_ets_init().

bool_t baro_ets_updated
bool_t baro_ets_valid

Definition at line 82 of file baro_ets.c.

Referenced by baro_ets_init(), baro_ets_read_event(), and baro_ets_read_periodic().