32#include "generated/flight_plan.h"
36#include "pprzlink/messages.h"
40#define BARO_AMSYS_ADDR 0xE4
41#define BARO_AMSYS_REG 0x07
42#ifndef BARO_AMSYS_SCALE
43#define BARO_AMSYS_SCALE 1
45#ifndef BARO_AMSYS_MAX_PRESSURE
46#define BARO_AMSYS_MAX_PRESSURE 103400
48#define BARO_AMSYS_OFFSET_MAX 29491
49#define BARO_AMSYS_OFFSET_MIN 3277
50#define BARO_AMSYS_OFFSET_NBSAMPLES_INIT 40
51#define BARO_AMSYS_OFFSET_NBSAMPLES_AVRG 60
52#ifndef BARO_AMSYS_FILTER
53#define BARO_AMSYS_FILTER 0
55#define BARO_AMSYS_R 0.5
56#define BARO_AMSYS_SIGMA2 0.1
58#ifdef MEASURE_AMSYS_TEMPERATURE
59#define TEMPERATURE_AMSYS_OFFSET_MAX 29491
60#define TEMPERATURE_AMSYS_OFFSET_MIN 3277
61#define TEMPERATURE_AMSYS_MAX 85
62#define TEMPERATURE_AMSYS_MIN -25
66#ifndef BARO_AMSYS_I2C_DEV
67#define BARO_AMSYS_I2C_DEV i2c0
123#ifndef MEASURE_AMSYS_TEMPERATURE
137#ifdef MEASURE_AMSYS_TEMPERATURE
139 const float temp_off_scale = (float)(TEMPERATURE_AMSYS_MAX - TEMPERATURE_AMSYS_MIN) /
140 (TEMPERATURE_AMSYS_OFFSET_MAX - TEMPERATURE_AMSYS_OFFSET_MIN);
143 TEMPERATURE_AMSYS_MIN;
Main include for ABI (AirBorneInterface).
#define BARO_AMSYS_SENDER_ID
bool baro_amsys_offset_init
void baro_amsys_read_event(void)
#define BARO_AMSYS_SIGMA2
#define BARO_AMSYS_OFFSET_MAX
void baro_amsys_init(void)
float baro_amsys_abs_altitude
void baro_amsys_read_periodic(void)
#define BARO_AMSYS_OFFSET_NBSAMPLES_INIT
double baro_amsys_offset_tmp
#define BARO_AMSYS_OFFSET_NBSAMPLES_AVRG
float baro_amsys_altitude
#define BARO_AMSYS_OFFSET_MIN
#define BARO_AMSYS_MAX_PRESSURE
float baro_amsys_offset_altitude
#define BARO_AMSYS_I2C_DEV
struct i2c_transaction baro_amsys_i2c_trans
#define BARO_AMSYS_FILTER
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
Common code for AP and FBW telemetry.
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.
API to get/set the generic vehicle states.
Architecture independent timing functions.
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.