PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <BMP280.hpp>
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)} |
Definition at line 44 of file BMP280.hpp.
BMP280::BMP280 | ( | bmp280::IBMP280 * | interface | ) |
Definition at line 36 of file BMP280.cpp.
|
virtual |
Definition at line 46 of file BMP280.cpp.
References _comms_errors, _interface, _measure_perf, _sample_perf, perf_free(), and Stop().
|
private |
Definition at line 151 of file BMP280.cpp.
References _collect_phase, _comms_errors, _fcal, _interface, _px4_baro, _sample_perf, BMP280_ADDR_DATA, data, bmp280::IBMP280::get_data(), hrt_absolute_time(), hrt_abstime, OK, P, bmp280::fcalibration_s::p1, bmp280::fcalibration_s::p2, bmp280::fcalibration_s::p3, bmp280::fcalibration_s::p4, bmp280::fcalibration_s::p5, bmp280::fcalibration_s::p6, bmp280::fcalibration_s::p7, bmp280::fcalibration_s::p8, bmp280::fcalibration_s::p9, bmp280::data_s::p_lsb, bmp280::data_s::p_msb, bmp280::data_s::p_xlsb, perf_begin(), perf_cancel(), perf_count(), perf_end(), perf_event_count(), PX4Barometer::set_error_count(), PX4Barometer::set_temperature(), bmp280::fcalibration_s::t1, bmp280::fcalibration_s::t2, bmp280::fcalibration_s::t3, bmp280::data_s::t_lsb, bmp280::data_s::t_msb, bmp280::data_s::t_xlsb, and PX4Barometer::update().
Referenced by Run().
int BMP280::init | ( | ) |
Definition at line 60 of file BMP280.cpp.
References _cal, _curr_ctrl, _fcal, _interface, BMP280_ADDR_CAL, BMP280_ADDR_CONFIG, BMP280_ADDR_CTRL, BMP280_ADDR_ID, BMP280_ADDR_RESET, BMP280_CONFIG_F16, BMP280_VALUE_ID, BMP280_VALUE_RESET, bmp280::IBMP280::get_calibration(), bmp280::IBMP280::get_reg(), OK, bmp280::calibration_s::p1, bmp280::fcalibration_s::p1, bmp280::calibration_s::p2, bmp280::fcalibration_s::p2, bmp280::calibration_s::p3, bmp280::fcalibration_s::p3, bmp280::calibration_s::p4, bmp280::fcalibration_s::p4, bmp280::calibration_s::p5, bmp280::fcalibration_s::p5, bmp280::calibration_s::p6, bmp280::fcalibration_s::p6, bmp280::calibration_s::p7, bmp280::fcalibration_s::p7, bmp280::calibration_s::p8, bmp280::fcalibration_s::p8, bmp280::calibration_s::p9, bmp280::fcalibration_s::p9, bmp280::IBMP280::set_reg(), Start(), bmp280::calibration_s::t1, bmp280::fcalibration_s::t1, bmp280::calibration_s::t2, bmp280::fcalibration_s::t2, bmp280::calibration_s::t3, and bmp280::fcalibration_s::t3.
Referenced by DfBmp280Wrapper::start(), and bmp280::start_bus().
|
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().
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().
|
overrideprivate |
Definition at line 117 of file BMP280.cpp.
References _collect_phase, _measure_interval, collect(), and measure().
|
private |
Definition at line 101 of file BMP280.cpp.
References _collect_phase.
Referenced by init().
|
private |
Definition at line 111 of file BMP280.cpp.
Referenced by ~BMP280().
|
private |
Definition at line 75 of file BMP280.hpp.
Referenced by init().
|
private |
|
private |
Definition at line 73 of file BMP280.hpp.
Referenced by collect(), measure(), print_info(), and ~BMP280().
|
staticprivate |
Definition at line 66 of file BMP280.hpp.
|
private |
Definition at line 76 of file BMP280.hpp.
|
private |
|
staticprivate |
Definition at line 67 of file BMP280.hpp.
Referenced by Run().
|
private |
Definition at line 72 of file BMP280.hpp.
Referenced by measure(), print_info(), and ~BMP280().
|
private |
Definition at line 61 of file BMP280.hpp.
Referenced by collect(), and print_info().
|
private |
Definition at line 71 of file BMP280.hpp.
Referenced by collect(), print_info(), and ~BMP280().