esp32_BNO08x 1.4 C++ BNO08x IMU driver component for esp-idf.

BNO08xRptUncalMagnetometer.hpp
Go to the documentation of this file.
1
7#pragma once
8
9#include "BNO08xRpt.hpp"
10
16 class BNO08xRptUncalMagnetometer : public BNO08xRpt
17{
18 public:
19 BNO08xRptUncalMagnetometer(uint8_t ID, EventBits_t rpt_bit, BNO08xPrivateTypes::bno08x_sync_ctx_t* sync_ctx)
20 : BNO08xRpt(ID, rpt_bit, sync_ctx)
21 {
22 }
23
24 bool enable(
25 uint32_t time_between_reports, sh2_SensorConfig_t sensor_cfg = BNO08xPrivateTypes::default_sensor_cfg) override;
26 void get(bno08x_magf_t& magf, bno08x_magf_bias_t& bias);
27 bno08x_magf_t get_magf();
28 bno08x_magf_bias_t get_bias();
29
30 private:
31 void update_data(sh2_SensorValue_t* sensor_val) override;
32 bno08x_magf_t data;
33 bno08x_magf_bias_t bias_data;
34 static const constexpr char* TAG = "BNO08xRptUncalMagnetometer";
35};
BNO08xRpt.hpp
BNO08xRpt
Class to represent and manage reports returned from BNO08x.
Definition: BNO08xRpt.hpp:26
BNO08xRpt::sync_ctx
BNO08xPrivateTypes::bno08x_sync_ctx_t * sync_ctx
Definition: BNO08xRpt.hpp:42
BNO08xRpt::ID
uint8_t ID
Report ID, ex. SH2_ACCELERATION.
Definition: BNO08xRpt.hpp:39
BNO08xRpt::rpt_bit
EventBits_t rpt_bit
Respective enable and data bit for report in evt_grp_rpt_en and evt_grp_rpt_data.
Definition: BNO08xRpt.hpp:40
BNO08xRptUncalMagnetometer
Class to represent uncalibrated magnetometer reports. (See Ref. Manual 6.5.17)
Definition: BNO08xRptUncalMagnetometer.hpp:17
BNO08xRptUncalMagnetometer::enable
bool enable(uint32_t time_between_reports, sh2_SensorConfig_t sensor_cfg=BNO08xPrivateTypes::default_sensor_cfg) override
Enables uncalibrated magnetometer reports such that the BNO08x begins sending them.
Definition: BNO08xRptUncalMagnetometer.cpp:36
BNO08xRptUncalMagnetometer::BNO08xRptUncalMagnetometer
BNO08xRptUncalMagnetometer(uint8_t ID, EventBits_t rpt_bit, BNO08xPrivateTypes::bno08x_sync_ctx_t *sync_ctx)
Definition: BNO08xRptUncalMagnetometer.hpp:19
BNO08xRptUncalMagnetometer::get_bias
bno08x_magf_bias_t get_bias()
Grabs most recent uncalibrated magnetometer bias data, units are in uTesla.
Definition: BNO08xRptUncalMagnetometer.cpp:75
BNO08xRptUncalMagnetometer::get
void get(bno08x_magf_t &magf, bno08x_magf_bias_t &bias)
Grabs most recent uncalibrated magnetometer data, units are in uTesla.
Definition: BNO08xRptUncalMagnetometer.cpp:49
BNO08xRptUncalMagnetometer::get_magf
bno08x_magf_t get_magf()
Grabs most recent uncalibrated magnetometer magnetic field data, units are in uTesla.
Definition: BNO08xRptUncalMagnetometer.cpp:62
BNO08xPrivateTypes::bno08x_sync_ctx_t
Holds context used to synchronize tasks and callback execution.
Definition: BNO08xPrivateTypes.hpp:57
bno08x_magf_bias_t
Struct to represent magnetic field bias data (units in uTesla)
Definition: BNO08xGlobalTypes.hpp:642
bno08x_magf_t
Struct to represent magnetic field data (units in uTesla)
Definition: BNO08xGlobalTypes.hpp:606