APM:Libraries
AP_Baro_BMP280.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <AP_HAL/AP_HAL.h>
4 #include <AP_HAL/Device.h>
6 
7 #include "AP_Baro_Backend.h"
8 
9 #ifndef HAL_BARO_BMP280_I2C_ADDR
10  #define HAL_BARO_BMP280_I2C_ADDR (0x76)
11 #endif
12 
14 {
15 public:
17 
18  /* AP_Baro public interface: */
19  void update();
20 
22 
23 private:
24 
25  bool _init(void);
26  void _timer(void);
27  void _update_temperature(int32_t);
28  void _update_pressure(int32_t);
29 
31 
33  uint8_t _instance;
34  int32_t _t_fine;
35  float _pressure;
36  float _temperature;
37 
38  // Internal calibration registers
39  int16_t _t2, _t3, _p2, _p3, _p4, _p5, _p6, _p7, _p8, _p9;
40  uint16_t _t1, _p1;
41 };
bool _init(void)
static AP_Baro_Backend * probe(AP_Baro &baro, AP_HAL::OwnPtr< AP_HAL::Device > dev)
AP_Baro_BMP280(AP_Baro &baro, AP_HAL::OwnPtr< AP_HAL::Device > dev)
AP_HAL::OwnPtr< AP_HAL::Device > _dev
void _update_temperature(int32_t)
static AP_HAL::OwnPtr< AP_HAL::Device > dev
Definition: ICM20789.cpp:16
static AP_Baro baro
Definition: ModuleTest.cpp:18
void _update_pressure(int32_t)