# esp32_BNO08x: include/report/BNO08xRptUncalMagnetometer.hpp Source File

Loading...
Searching...
No Matches
BNO08xRptUncalMagnetometer.hpp
Go to the documentation of this file.
#pragma once
#include "BNO08xRpt.hpp"
class BNO08xRptUncalMagnetometer : public BNO08xRpt
{
public:
BNO08xRptUncalMagnetometer(uint8_t ID, EventBits_t rpt_bit, BNO08xPrivateTypes::bno08x_sync_ctx_t* sync_ctx)
: BNO08xRpt(ID, rpt_bit, sync_ctx)
{
}
bool enable(
uint32_t time_between_reports, sh2_SensorConfig_t sensor_cfg = BNO08xPrivateTypes::default_sensor_cfg) override;
void get(bno08x_magf_t& magf, bno08x_magf_bias_t& bias);
bno08x_magf_t get_magf();
bno08x_magf_bias_t get_bias();
private:
void update_data(sh2_SensorValue_t* sensor_val) override;
bno08x_magf_t data;
bno08x_magf_bias_t bias_data;
static const constexpr char* TAG = "BNO08xRptUncalMagnetometer";
};
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::bias_data
bno08x_magf_bias_t bias_data
Definition BNO08xRptUncalMagnetometer.hpp:33
BNO08xRptUncalMagnetometer::TAG
static const constexpr char * TAG
Definition BNO08xRptUncalMagnetometer.hpp:34
BNO08xRptUncalMagnetometer::update_data
void update_data(sh2_SensorValue_t *sensor_val) override
Updates uncalibrated magf data from decoded sensor event.
Definition BNO08xRptUncalMagnetometer.cpp:15
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::data
bno08x_magf_t data
Definition BNO08xRptUncalMagnetometer.hpp:32
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::default_sensor_cfg
static sh2_SensorConfig default_sensor_cfg
Definition BNO08xPrivateTypes.hpp:127
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:328
bno08x_magf_t
Struct to represent magnetic field data (units in uTesla)
Definition BNO08xGlobalTypes.hpp:292