37 ScheduledWorkItem(MODULE_NAME,
px4::device_bus_to_wq(interface->get_device_id())),
38 _px4_baro(interface->get_device_id()),
39 _interface(interface),
161 if (data ==
nullptr) {
172 float ofs = (float) t_raw -
_fcal.
t1;
174 const float T = t_fine * (1.0f / 5120.0f);
177 float tf = t_fine - 128000.0f;
181 float pf = ((float) p_raw + x1) / x2;
187 float pressure = P / 100.0f;
bmp280::fcalibration_s _fcal
void set_temperature(float temperature)
virtual int set_reg(uint8_t value, uint8_t addr)=0
bmp280::calibration_s * _cal
measure the time elapsed performing an event
bmp280::IBMP280 * _interface
void set_error_count(uint64_t error_count)
static constexpr uint8_t _curr_ctrl
perf_counter_t _sample_perf
virtual bmp280::data_s * get_data(uint8_t addr)=0
count the number of times an event occurs
virtual bmp280::calibration_s * get_calibration(uint8_t addr)=0
void perf_count(perf_counter_t handle)
Count a performance event.
virtual uint8_t get_reg(uint8_t addr)=0
void perf_free(perf_counter_t handle)
Free a counter.
#define BMP280_CTRL_MODE_FORCE
void update(hrt_abstime timestamp, float pressure)
void perf_end(perf_counter_t handle)
End a performance event.
#define BMP280_ADDR_CONFIG
__BEGIN_DECLS typedef uint64_t hrt_abstime
Absolute time, in microsecond units.
perf_counter_t _measure_perf
BMP280(bmp280::IBMP280 *interface)
#define BMP280_CONFIG_F16
void perf_print_counter(perf_counter_t handle)
Print one performance counter to stdout.
uint64_t perf_event_count(perf_counter_t handle)
Return current event_count.
void perf_cancel(perf_counter_t handle)
Cancel a performance event.
#define BMP280_VALUE_RESET
#define BMP280_ADDR_RESET
perf_counter_t _comms_errors
static constexpr uint32_t _measure_interval
void perf_begin(perf_counter_t handle)
Begin a performance event.
__EXPORT hrt_abstime hrt_absolute_time(void)
Get absolute time in [us] (does not wrap).