APM:Libraries
AP_Baro_LPS2XH.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 #define HAL_BARO_LPS25H_I2C_BUS 0
10 #define HAL_BARO_LPS25H_I2C_ADDR 0x5D
11 
12 
14 {
15 public:
16  enum LPS2XH_TYPE {
19  };
20 
22 
23  /* AP_Baro public interface: */
24  void update();
25 
28 
29 private:
30  virtual ~AP_Baro_LPS2XH(void) {};
31 
32  bool _init(void);
33  void _timer(void);
34  void _update_temperature(void);
35  void _update_pressure(void);
36  bool _imu_i2c_init(uint8_t imu_address);
37 
38  bool _check_whoami(void);
39 
41 
43  uint8_t _instance;
44  float _pressure;
45  float _temperature;
46 
47  uint32_t CallTime = 0;
48 
50 };
uint32_t CallTime
bool _check_whoami(void)
AP_Baro_LPS2XH(AP_Baro &baro, AP_HAL::OwnPtr< AP_HAL::Device > dev)
static AP_Baro_Backend * probe(AP_Baro &baro, AP_HAL::OwnPtr< AP_HAL::Device > dev)
void _update_pressure(void)
bool _imu_i2c_init(uint8_t imu_address)
void _update_temperature(void)
static AP_HAL::OwnPtr< AP_HAL::Device > dev
Definition: ICM20789.cpp:16
static AP_Baro baro
Definition: ModuleTest.cpp:18
enum LPS2XH_TYPE _lps2xh_type
virtual ~AP_Baro_LPS2XH(void)
static AP_Baro_Backend * probe_InvensenseIMU(AP_Baro &baro, AP_HAL::OwnPtr< AP_HAL::Device > dev, uint8_t imu_address)
AP_HAL::OwnPtr< AP_HAL::Device > _dev