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

#include <AP_Baro_BMP280.h>

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

Public Member Functions

 AP_Baro_BMP280 (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)
 

Private Member Functions

bool _init (void)
 
void _timer (void)
 
void _update_temperature (int32_t)
 
void _update_pressure (int32_t)
 

Private Attributes

AP_HAL::OwnPtr< AP_HAL::Device_dev
 
bool _has_sample
 
uint8_t _instance
 
int32_t _t_fine
 
float _pressure
 
float _temperature
 
int16_t _t2
 
int16_t _t3
 
int16_t _p2
 
int16_t _p3
 
int16_t _p4
 
int16_t _p5
 
int16_t _p6
 
int16_t _p7
 
int16_t _p8
 
int16_t _p9
 
uint16_t _t1
 
uint16_t _p1
 

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_BMP280.h.

Constructor & Destructor Documentation

◆ AP_Baro_BMP280()

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

Definition at line 46 of file AP_Baro_BMP280.cpp.

Referenced by probe().

Here is the caller graph for this function:

Member Function Documentation

◆ _init()

bool AP_Baro_BMP280::_init ( void  )
private

Definition at line 67 of file AP_Baro_BMP280.cpp.

Referenced by probe().

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

◆ _timer()

void AP_Baro_BMP280::_timer ( void  )
private

Definition at line 126 of file AP_Baro_BMP280.cpp.

Referenced by _init().

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

◆ _update_pressure()

void AP_Baro_BMP280::_update_pressure ( int32_t  press_raw)
private

Definition at line 171 of file AP_Baro_BMP280.cpp.

Referenced by _timer().

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

◆ _update_temperature()

void AP_Baro_BMP280::_update_temperature ( int32_t  temp_raw)
private

Definition at line 152 of file AP_Baro_BMP280.cpp.

Referenced by _timer().

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

◆ probe()

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

Definition at line 52 of file AP_Baro_BMP280.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_BMP280::update ( void  )
virtual

Implements AP_Baro_Backend.

Definition at line 137 of file AP_Baro_BMP280.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _dev

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

Definition at line 30 of file AP_Baro_BMP280.h.

Referenced by _init(), and _timer().

◆ _has_sample

bool AP_Baro_BMP280::_has_sample
private

Definition at line 32 of file AP_Baro_BMP280.h.

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

◆ _instance

uint8_t AP_Baro_BMP280::_instance
private

Definition at line 33 of file AP_Baro_BMP280.h.

Referenced by _init(), and update().

◆ _p1

uint16_t AP_Baro_BMP280::_p1
private

Definition at line 40 of file AP_Baro_BMP280.h.

Referenced by _init(), and _update_pressure().

◆ _p2

int16_t AP_Baro_BMP280::_p2
private

Definition at line 39 of file AP_Baro_BMP280.h.

Referenced by _init(), and _update_pressure().

◆ _p3

int16_t AP_Baro_BMP280::_p3
private

Definition at line 39 of file AP_Baro_BMP280.h.

Referenced by _init(), and _update_pressure().

◆ _p4

int16_t AP_Baro_BMP280::_p4
private

Definition at line 39 of file AP_Baro_BMP280.h.

Referenced by _init(), and _update_pressure().

◆ _p5

int16_t AP_Baro_BMP280::_p5
private

Definition at line 39 of file AP_Baro_BMP280.h.

Referenced by _init(), and _update_pressure().

◆ _p6

int16_t AP_Baro_BMP280::_p6
private

Definition at line 39 of file AP_Baro_BMP280.h.

Referenced by _init(), and _update_pressure().

◆ _p7

int16_t AP_Baro_BMP280::_p7
private

Definition at line 39 of file AP_Baro_BMP280.h.

Referenced by _init(), and _update_pressure().

◆ _p8

int16_t AP_Baro_BMP280::_p8
private

Definition at line 39 of file AP_Baro_BMP280.h.

Referenced by _init(), and _update_pressure().

◆ _p9

int16_t AP_Baro_BMP280::_p9
private

Definition at line 39 of file AP_Baro_BMP280.h.

Referenced by _init(), and _update_pressure().

◆ _pressure

float AP_Baro_BMP280::_pressure
private

Definition at line 35 of file AP_Baro_BMP280.h.

Referenced by _update_pressure(), and update().

◆ _t1

uint16_t AP_Baro_BMP280::_t1
private

Definition at line 40 of file AP_Baro_BMP280.h.

Referenced by _init(), and _update_temperature().

◆ _t2

int16_t AP_Baro_BMP280::_t2
private

Definition at line 39 of file AP_Baro_BMP280.h.

Referenced by _init().

◆ _t3

int16_t AP_Baro_BMP280::_t3
private

Definition at line 39 of file AP_Baro_BMP280.h.

Referenced by _init(), and _update_temperature().

◆ _t_fine

int32_t AP_Baro_BMP280::_t_fine
private

Definition at line 34 of file AP_Baro_BMP280.h.

Referenced by _update_pressure(), and _update_temperature().

◆ _temperature

float AP_Baro_BMP280::_temperature
private

Definition at line 36 of file AP_Baro_BMP280.h.

Referenced by _update_temperature(), and update().


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