APM:Libraries
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
AP_Baro_LPS2XH Class Reference

#include <AP_Baro_LPS2XH.h>

Inheritance diagram for AP_Baro_LPS2XH:
[legend]
Collaboration diagram for AP_Baro_LPS2XH:
[legend]

Public Types

enum  LPS2XH_TYPE { BARO_LPS22H = 0, BARO_LPS25H = 1 }
 

Public Member Functions

 AP_Baro_LPS2XH (AP_Baro &baro, AP_HAL::OwnPtr< AP_HAL::Device > dev)
 
void update ()
 
- Public Member Functions inherited from AP_Baro_Backend
 AP_Baro_Backend (AP_Baro &baro)
 
virtual ~AP_Baro_Backend (void)
 
virtual void accumulate (void)
 
virtual void handle_baro_msg (float pressure, float temperature)
 
void backend_update (uint8_t instance)
 
bool pressure_ok (float press)
 
uint32_t get_error_count () const
 

Static Public Member Functions

static AP_Baro_Backendprobe (AP_Baro &baro, AP_HAL::OwnPtr< AP_HAL::Device > dev)
 
static AP_Baro_Backendprobe_InvensenseIMU (AP_Baro &baro, AP_HAL::OwnPtr< AP_HAL::Device > dev, uint8_t imu_address)
 

Private Member Functions

virtual ~AP_Baro_LPS2XH (void)
 
bool _init (void)
 
void _timer (void)
 
void _update_temperature (void)
 
void _update_pressure (void)
 
bool _imu_i2c_init (uint8_t imu_address)
 
bool _check_whoami (void)
 

Private Attributes

AP_HAL::OwnPtr< AP_HAL::Device_dev
 
bool _has_sample
 
uint8_t _instance
 
float _pressure
 
float _temperature
 
uint32_t CallTime = 0
 
enum LPS2XH_TYPE _lps2xh_type
 

Additional Inherited Members

- Protected Member Functions inherited from AP_Baro_Backend
void _copy_to_frontend (uint8_t instance, float pressure, float temperature)
 
virtual void update_healthy_flag (uint8_t instance)
 
- Protected Attributes inherited from AP_Baro_Backend
AP_Baro_frontend
 
AP_HAL::Semaphore_sem
 
float _mean_pressure
 
uint32_t _error_count
 

Detailed Description

Definition at line 13 of file AP_Baro_LPS2XH.h.

Member Enumeration Documentation

◆ LPS2XH_TYPE

Enumerator
BARO_LPS22H 
BARO_LPS25H 

Definition at line 16 of file AP_Baro_LPS2XH.h.

Constructor & Destructor Documentation

◆ AP_Baro_LPS2XH()

AP_Baro_LPS2XH::AP_Baro_LPS2XH ( AP_Baro baro,
AP_HAL::OwnPtr< AP_HAL::Device dev 
)

Definition at line 56 of file AP_Baro_LPS2XH.cpp.

Referenced by probe(), and probe_InvensenseIMU().

Here is the caller graph for this function:

◆ ~AP_Baro_LPS2XH()

virtual AP_Baro_LPS2XH::~AP_Baro_LPS2XH ( void  )
inlineprivatevirtual

Definition at line 30 of file AP_Baro_LPS2XH.h.

Here is the call graph for this function:

Member Function Documentation

◆ _check_whoami()

bool AP_Baro_LPS2XH::_check_whoami ( void  )
private

Definition at line 177 of file AP_Baro_LPS2XH.cpp.

Referenced by _init(), and ~AP_Baro_LPS2XH().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _imu_i2c_init()

bool AP_Baro_LPS2XH::_imu_i2c_init ( uint8_t  imu_address)
private

Definition at line 101 of file AP_Baro_LPS2XH.cpp.

Referenced by probe_InvensenseIMU(), and ~AP_Baro_LPS2XH().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _init()

bool AP_Baro_LPS2XH::_init ( void  )
private

Definition at line 132 of file AP_Baro_LPS2XH.cpp.

Referenced by probe(), probe_InvensenseIMU(), and ~AP_Baro_LPS2XH().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _timer()

void AP_Baro_LPS2XH::_timer ( void  )
private

Definition at line 198 of file AP_Baro_LPS2XH.cpp.

Referenced by _init(), and ~AP_Baro_LPS2XH().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _update_pressure()

void AP_Baro_LPS2XH::_update_pressure ( void  )
private

Definition at line 238 of file AP_Baro_LPS2XH.cpp.

Referenced by _timer(), and ~AP_Baro_LPS2XH().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _update_temperature()

void AP_Baro_LPS2XH::_update_temperature ( void  )
private

Definition at line 221 of file AP_Baro_LPS2XH.cpp.

Referenced by _timer(), and ~AP_Baro_LPS2XH().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ probe()

AP_Baro_Backend * AP_Baro_LPS2XH::probe ( AP_Baro baro,
AP_HAL::OwnPtr< AP_HAL::Device dev 
)
static

Definition at line 62 of file AP_Baro_LPS2XH.cpp.

Referenced by AP_Baro::init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ probe_InvensenseIMU()

AP_Baro_Backend * AP_Baro_LPS2XH::probe_InvensenseIMU ( AP_Baro baro,
AP_HAL::OwnPtr< AP_HAL::Device dev,
uint8_t  imu_address 
)
static

Definition at line 76 of file AP_Baro_LPS2XH.cpp.

Referenced by AP_Baro::init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void AP_Baro_LPS2XH::update ( void  )
virtual

Implements AP_Baro_Backend.

Definition at line 206 of file AP_Baro_LPS2XH.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _dev

AP_HAL::OwnPtr<AP_HAL::Device> AP_Baro_LPS2XH::_dev
private

◆ _has_sample

bool AP_Baro_LPS2XH::_has_sample
private

Definition at line 42 of file AP_Baro_LPS2XH.h.

Referenced by _init(), _timer(), and update().

◆ _instance

uint8_t AP_Baro_LPS2XH::_instance
private

Definition at line 43 of file AP_Baro_LPS2XH.h.

Referenced by _init(), and update().

◆ _lps2xh_type

enum LPS2XH_TYPE AP_Baro_LPS2XH::_lps2xh_type
private

Definition at line 49 of file AP_Baro_LPS2XH.h.

Referenced by _check_whoami(), _init(), and _update_temperature().

◆ _pressure

float AP_Baro_LPS2XH::_pressure
private

Definition at line 44 of file AP_Baro_LPS2XH.h.

Referenced by _update_pressure(), and update().

◆ _temperature

float AP_Baro_LPS2XH::_temperature
private

Definition at line 45 of file AP_Baro_LPS2XH.h.

Referenced by _update_temperature(), and update().

◆ CallTime

uint32_t AP_Baro_LPS2XH::CallTime = 0
private

Definition at line 47 of file AP_Baro_LPS2XH.h.

Referenced by _init().


The documentation for this class was generated from the following files: