PX4 Firmware
PX4 Autopilot Software http://px4.io
BMP280 Class Reference

#include <BMP280.hpp>

Inheritance diagram for BMP280:
Collaboration diagram for BMP280:

Public Member Functions

 BMP280 (bmp280::IBMP280 *interface)
 
virtual ~BMP280 ()
 
int init ()
 
void print_info ()
 

Private Member Functions

void Run () override
 
void Start ()
 
void Stop ()
 
int measure ()
 
int collect ()
 

Private Attributes

PX4Barometer _px4_baro
 
bmp280::IBMP280_interface
 
bool _collect_phase {false}
 
perf_counter_t _sample_perf
 
perf_counter_t _measure_perf
 
perf_counter_t _comms_errors
 
bmp280::calibration_s_cal {nullptr}
 
bmp280::fcalibration_s _fcal {}
 

Static Private Attributes

static constexpr uint8_t _curr_ctrl {BMP280_CTRL_P16 | BMP280_CTRL_T2}
 
static constexpr uint32_t _measure_interval {BMP280_MT_INIT + BMP280_MT *(16 - 1 + 2 - 1)}
 

Detailed Description

Definition at line 44 of file BMP280.hpp.

Constructor & Destructor Documentation

◆ BMP280()

BMP280::BMP280 ( bmp280::IBMP280 interface)

Definition at line 36 of file BMP280.cpp.

◆ ~BMP280()

BMP280::~BMP280 ( )
virtual

Definition at line 46 of file BMP280.cpp.

References _comms_errors, _interface, _measure_perf, _sample_perf, perf_free(), and Stop().

Here is the call graph for this function:

Member Function Documentation

◆ collect()

◆ init()

◆ measure()

int BMP280::measure ( )
private

Definition at line 130 of file BMP280.cpp.

References _collect_phase, _comms_errors, _curr_ctrl, _interface, _measure_perf, BMP280_ADDR_CTRL, BMP280_CTRL_MODE_FORCE, OK, perf_begin(), perf_cancel(), perf_count(), perf_end(), and bmp280::IBMP280::set_reg().

Referenced by Run().

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

◆ print_info()

void BMP280::print_info ( )

Definition at line 196 of file BMP280.cpp.

References _comms_errors, _measure_perf, _px4_baro, _sample_perf, perf_print_counter(), and PX4Barometer::print_status().

Referenced by bmp280::status().

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

◆ Run()

void BMP280::Run ( )
overrideprivate

Definition at line 117 of file BMP280.cpp.

References _collect_phase, _measure_interval, collect(), and measure().

Here is the call graph for this function:

◆ Start()

void BMP280::Start ( )
private

Definition at line 101 of file BMP280.cpp.

References _collect_phase.

Referenced by init().

Here is the caller graph for this function:

◆ Stop()

void BMP280::Stop ( )
private

Definition at line 111 of file BMP280.cpp.

Referenced by ~BMP280().

Here is the caller graph for this function:

Member Data Documentation

◆ _cal

bmp280::calibration_s* BMP280::_cal {nullptr}
private

Definition at line 75 of file BMP280.hpp.

Referenced by init().

◆ _collect_phase

bool BMP280::_collect_phase {false}
private

Definition at line 69 of file BMP280.hpp.

Referenced by collect(), measure(), Run(), and Start().

◆ _comms_errors

perf_counter_t BMP280::_comms_errors
private

Definition at line 73 of file BMP280.hpp.

Referenced by collect(), measure(), print_info(), and ~BMP280().

◆ _curr_ctrl

constexpr uint8_t BMP280::_curr_ctrl {BMP280_CTRL_P16 | BMP280_CTRL_T2}
staticprivate

Definition at line 66 of file BMP280.hpp.

Referenced by init(), and measure().

◆ _fcal

bmp280::fcalibration_s BMP280::_fcal {}
private

Definition at line 76 of file BMP280.hpp.

Referenced by collect(), and init().

◆ _interface

bmp280::IBMP280* BMP280::_interface
private

Definition at line 63 of file BMP280.hpp.

Referenced by collect(), init(), measure(), and ~BMP280().

◆ _measure_interval

constexpr uint32_t BMP280::_measure_interval {BMP280_MT_INIT + BMP280_MT *(16 - 1 + 2 - 1)}
staticprivate

Definition at line 67 of file BMP280.hpp.

Referenced by Run().

◆ _measure_perf

perf_counter_t BMP280::_measure_perf
private

Definition at line 72 of file BMP280.hpp.

Referenced by measure(), print_info(), and ~BMP280().

◆ _px4_baro

PX4Barometer BMP280::_px4_baro
private

Definition at line 61 of file BMP280.hpp.

Referenced by collect(), and print_info().

◆ _sample_perf

perf_counter_t BMP280::_sample_perf
private

Definition at line 71 of file BMP280.hpp.

Referenced by collect(), print_info(), and ~BMP280().


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