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

#include <AP_Baro_BMP085.h>

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

Public Member Functions

 AP_Baro_BMP085 (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 _cmd_read_pressure ()
 
void _cmd_read_temp ()
 
bool _read_pressure ()
 
void _read_temp ()
 
void _calculate ()
 
bool _data_ready ()
 
void _timer (void)
 
uint16_t _read_prom_word (uint8_t word)
 
bool _read_prom (uint16_t *prom)
 

Private Attributes

AP_HAL::OwnPtr< AP_HAL::Device_dev
 
AP_HAL::DigitalSource_eoc
 
uint8_t _instance
 
bool _has_sample
 
uint32_t _last_press_read_command_time
 
uint32_t _last_temp_read_command_time
 
uint8_t _state
 
int16_t ac1
 
int16_t ac2
 
int16_t ac3
 
int16_t b1
 
int16_t b2
 
int16_t mb
 
int16_t mc
 
int16_t md
 
uint16_t ac4
 
uint16_t ac5
 
uint16_t ac6
 
int32_t _raw_pressure
 
int32_t _raw_temp
 
int32_t _temp
 
AverageIntegralFilter< int32_t, int32_t, 10 > _pressure_filter
 
uint8_t _vers
 
uint8_t _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 14 of file AP_Baro_BMP085.h.

Constructor & Destructor Documentation

◆ AP_Baro_BMP085()

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

Definition at line 37 of file AP_Baro_BMP085.cpp.

Referenced by probe().

Here is the caller graph for this function:

Member Function Documentation

◆ _calculate()

void AP_Baro_BMP085::_calculate ( )
private

Definition at line 275 of file AP_Baro_BMP085.cpp.

Referenced by _timer().

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

◆ _cmd_read_pressure()

void AP_Baro_BMP085::_cmd_read_pressure ( )
private

Definition at line 221 of file AP_Baro_BMP085.cpp.

Referenced by _timer().

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

◆ _cmd_read_temp()

void AP_Baro_BMP085::_cmd_read_temp ( )
private

Definition at line 252 of file AP_Baro_BMP085.cpp.

Referenced by _init(), and _timer().

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

◆ _data_ready()

bool AP_Baro_BMP085::_data_ready ( )
private

Definition at line 322 of file AP_Baro_BMP085.cpp.

Referenced by _timer().

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

◆ _init()

bool AP_Baro_BMP085::_init ( )
private

Definition at line 58 of file AP_Baro_BMP085.cpp.

Referenced by probe().

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

◆ _read_pressure()

bool AP_Baro_BMP085::_read_pressure ( )
private

Definition at line 228 of file AP_Baro_BMP085.cpp.

Referenced by _timer().

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

◆ _read_prom()

bool AP_Baro_BMP085::_read_prom ( uint16_t *  prom)
private

Definition at line 160 of file AP_Baro_BMP085.cpp.

Referenced by _init().

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

◆ _read_prom_word()

uint16_t AP_Baro_BMP085::_read_prom_word ( uint8_t  word)
private

Definition at line 150 of file AP_Baro_BMP085.cpp.

Referenced by _read_prom().

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

◆ _read_temp()

void AP_Baro_BMP085::_read_temp ( )
private

Definition at line 259 of file AP_Baro_BMP085.cpp.

Referenced by _timer().

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

◆ _timer()

void AP_Baro_BMP085::_timer ( void  )
private

Definition at line 180 of file AP_Baro_BMP085.cpp.

Referenced by _init().

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

◆ probe()

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

Definition at line 42 of file AP_Baro_BMP085.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_BMP085::update ( void  )
virtual

Implements AP_Baro_Backend.

Definition at line 204 of file AP_Baro_BMP085.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _dev

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

◆ _eoc

AP_HAL::DigitalSource* AP_Baro_BMP085::_eoc
private

Definition at line 41 of file AP_Baro_BMP085.h.

Referenced by _data_ready(), and _init().

◆ _has_sample

bool AP_Baro_BMP085::_has_sample
private

Definition at line 44 of file AP_Baro_BMP085.h.

Referenced by _calculate(), and update().

◆ _instance

uint8_t AP_Baro_BMP085::_instance
private

Definition at line 43 of file AP_Baro_BMP085.h.

Referenced by _init(), and update().

◆ _last_press_read_command_time

uint32_t AP_Baro_BMP085::_last_press_read_command_time
private

Definition at line 47 of file AP_Baro_BMP085.h.

Referenced by _cmd_read_pressure(), _data_ready(), _init(), and _read_pressure().

◆ _last_temp_read_command_time

uint32_t AP_Baro_BMP085::_last_temp_read_command_time
private

Definition at line 48 of file AP_Baro_BMP085.h.

Referenced by _cmd_read_temp(), _data_ready(), and _init().

◆ _pressure_filter

AverageIntegralFilter<int32_t, int32_t, 10> AP_Baro_BMP085::_pressure_filter
private

Definition at line 60 of file AP_Baro_BMP085.h.

Referenced by _calculate(), and update().

◆ _raw_pressure

int32_t AP_Baro_BMP085::_raw_pressure
private

Definition at line 57 of file AP_Baro_BMP085.h.

Referenced by _calculate(), and _read_pressure().

◆ _raw_temp

int32_t AP_Baro_BMP085::_raw_temp
private

Definition at line 58 of file AP_Baro_BMP085.h.

Referenced by _calculate(), and _read_temp().

◆ _state

uint8_t AP_Baro_BMP085::_state
private

Definition at line 51 of file AP_Baro_BMP085.h.

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

◆ _temp

int32_t AP_Baro_BMP085::_temp
private

Definition at line 59 of file AP_Baro_BMP085.h.

Referenced by _calculate(), and update().

◆ _type

uint8_t AP_Baro_BMP085::_type
private

Definition at line 63 of file AP_Baro_BMP085.h.

Referenced by _init().

◆ _vers

uint8_t AP_Baro_BMP085::_vers
private

Definition at line 62 of file AP_Baro_BMP085.h.

Referenced by _init().

◆ ac1

int16_t AP_Baro_BMP085::ac1
private

Definition at line 54 of file AP_Baro_BMP085.h.

Referenced by _calculate(), and _init().

◆ ac2

int16_t AP_Baro_BMP085::ac2
private

Definition at line 54 of file AP_Baro_BMP085.h.

Referenced by _calculate(), and _init().

◆ ac3

int16_t AP_Baro_BMP085::ac3
private

Definition at line 54 of file AP_Baro_BMP085.h.

Referenced by _calculate(), and _init().

◆ ac4

uint16_t AP_Baro_BMP085::ac4
private

Definition at line 55 of file AP_Baro_BMP085.h.

Referenced by _calculate(), and _init().

◆ ac5

uint16_t AP_Baro_BMP085::ac5
private

Definition at line 55 of file AP_Baro_BMP085.h.

Referenced by _calculate(), and _init().

◆ ac6

uint16_t AP_Baro_BMP085::ac6
private

Definition at line 55 of file AP_Baro_BMP085.h.

Referenced by _calculate(), and _init().

◆ b1

int16_t AP_Baro_BMP085::b1
private

Definition at line 54 of file AP_Baro_BMP085.h.

Referenced by _calculate(), and _init().

◆ b2

int16_t AP_Baro_BMP085::b2
private

Definition at line 54 of file AP_Baro_BMP085.h.

Referenced by _calculate(), and _init().

◆ mb

int16_t AP_Baro_BMP085::mb
private

Definition at line 54 of file AP_Baro_BMP085.h.

Referenced by _init().

◆ mc

int16_t AP_Baro_BMP085::mc
private

Definition at line 54 of file AP_Baro_BMP085.h.

Referenced by _calculate(), and _init().

◆ md

int16_t AP_Baro_BMP085::md
private

Definition at line 54 of file AP_Baro_BMP085.h.

Referenced by _calculate(), and _init().


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