34 #include "pprzlink/messages.h"
38 #if DOWNLINK && !defined(BMP280_SYNC_SEND)
43 #ifndef BMP280_USE_SPI
44 #define BMP280_USE_SPI FALSE
50 #ifndef BMP280_SLAVE_ADDR
51 #define BMP280_SLAVE_ADDR BMP280_I2C_ADDR
54 #ifndef BMP280_SLAVE_IDX
55 #define BMP280_SLAVE_IDX SPI_SLAVE0
67 #if DOWNLINK && !defined(BMP280_SYNC_SEND)
74 pprz_msg_send_BMP_STATUS(trans,
dev, AC_ID, &baro_altitude, &baro_altitude , &baro_pressure, & baro_temperature);
93 #if DOWNLINK && !defined(BMP280_SYNC_SEND)
118 #if defined(BMP280_SYNC_SEND)
Main include for ABI (AirBorneInterface).
#define BARO_BMP_SENDER_ID
#define BMP280_SLAVE_ADDR
default slave address
void baro_bmp280_periodic(void)
void baro_bmp280_init(void)
static void send_baro_bmp_data(struct transport_tx *trans, struct link_device *dev)
void baro_bmp280_event(void)
struct bmp280_t baro_bmp280
Bosch BMP280 sensor interface.
void bmp280_periodic(struct bmp280_t *bmp)
Should be called periodically to request sensor readings.
void bmp280_init(struct bmp280_t *bmp)
Initialize the bmp280 sensor instance.
void bmp280_event(struct bmp280_t *bmp)
Should be called in the event thread.
volatile bool data_available
data ready flag
float temperature
temperature in deg Celcius
uint32_t raw_temperature
uncompensated temperature
enum bmp280_bus_t bus
The communication bus used to connect the device SPI/I2C.
float pressure
pressure in Pascal
uint32_t raw_pressure
uncompensated pressure
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
Common code for AP and FBW telemetry.
static float pprz_isa_altitude_of_pressure(float pressure)
Get absolute altitude from pressure (using simplified equation).
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
Paparazzi atmospheric pressure conversion utilities.
static const struct usb_device_descriptor dev
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
Periodic telemetry system header (includes downlink utility and generated code).
#define DefaultPeriodic
Set default periodic telemetry.
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
int int32_t
Typedef defining 32 bit int type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.