51 #ifdef BARO_ETS_SYNC_SEND
54 #include "pprzlink/messages.h"
58 #define BARO_ETS_ADDR 0xE8
59 #define BARO_ETS_REG 0x07
60 #define BARO_ETS_OFFSET_MAX 30000
61 #define BARO_ETS_OFFSET_MIN 10
62 #define BARO_ETS_OFFSET_NBSAMPLES_INIT 20
63 #define BARO_ETS_OFFSET_NBSAMPLES_AVRG 40
64 #define BARO_ETS_R 0.5
65 #define BARO_ETS_SIGMA2 0.1
74 #ifndef BARO_ETS_SCALE
75 #define BARO_ETS_SCALE 37.5
79 #ifndef BARO_ETS_ALT_SCALE
80 #define BARO_ETS_ALT_SCALE 0.32
84 #ifndef BARO_ETS_PRESSURE_OFFSET
85 #define BARO_ETS_PRESSURE_OFFSET 101325.0
88 #ifndef BARO_ETS_I2C_DEV
89 #define BARO_ETS_I2C_DEV i2c0
97 #ifndef BARO_ETS_START_DELAY
98 #define BARO_ETS_START_DELAY 0.2
192 #ifdef BARO_ETS_SYNC_SEND
Main include for ABI (AirBorneInterface).
#define BARO_ETS_SENDER_ID
void baro_ets_read_periodic(void)
uint32_t baro_ets_delay_time
#define BARO_ETS_ALT_SCALE
scale factor to convert raw ADC measurement to altitude change in meters
#define BARO_ETS_SCALE
scale factor to convert raw ADC measurement to pressure in Pascal.
struct i2c_transaction baro_ets_i2c_trans
#define BARO_ETS_START_DELAY
delay in seconds until sensor is read after startup
bool baro_ets_offset_init
#define BARO_ETS_OFFSET_MIN
void baro_ets_read_event(void)
#define BARO_ETS_PRESSURE_OFFSET
Pressure offset in Pascal when converting raw adc to real pressure (.
uint32_t baro_ets_offset_tmp
#define BARO_ETS_OFFSET_MAX
#define BARO_ETS_OFFSET_NBSAMPLES_AVRG
#define BARO_ETS_OFFSET_NBSAMPLES_INIT
Driver for the EagleTree Systems Altitude Sensor.
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
float ground_alt
size == nb_waypoint, waypoint 0 is a dummy waypoint
Common code for AP and FBW telemetry.
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
enum I2CTransactionStatus status
Transaction status.
bool i2c_receive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint16_t len)
Submit a read only transaction.
@ I2CTransDone
transaction set to done by user level
I2C transaction structure.
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
Fixedwing Navigation library.
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
API to get/set the generic vehicle states.
Architecture independent timing functions.
#define SysTimeTimerStart(_t)
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.