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

BNO08xRptRVGeneric.hpp
Go to the documentation of this file.
1
6#pragma once
7
8#include "BNO08xRpt.hpp"
9
15 class BNO08xRptRVGeneric : public BNO08xRpt
16{
17 public:
18 bool enable(
19 uint32_t time_between_reports, sh2_SensorConfig_t sensor_cfg = BNO08xPrivateTypes::default_sensor_cfg) override;
20 bno08x_quat_t get_quat();
21 bno08x_euler_angle_t get_euler(bool in_degrees = true);
22
23 protected:
24 BNO08xRptRVGeneric(uint8_t ID, EventBits_t rpt_bit, BNO08xPrivateTypes::bno08x_sync_ctx_t* sync_ctx)
25 : BNO08xRpt(ID, rpt_bit, sync_ctx)
26 {
27 }
28 bool tare(bool x, bool y, bool z, sh2_TareBasis_t basis);
29 bno08x_quat_t data;
30 static const constexpr char* TAG = "BNO08xRptRVGeneric";
31};
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
BNO08xRptRVGeneric
Class to represent rotation vector reports.
Definition: BNO08xRptRVGeneric.hpp:16
BNO08xRptRVGeneric::enable
bool enable(uint32_t time_between_reports, sh2_SensorConfig_t sensor_cfg=BNO08xPrivateTypes::default_sensor_cfg) override
Enables a rotation vector report such that the BNO08x begins it.
Definition: BNO08xRptRVGeneric.cpp:17
BNO08xRptRVGeneric::TAG
static const constexpr char * TAG
Definition: BNO08xRptRVGeneric.hpp:30
BNO08xRptRVGeneric::BNO08xRptRVGeneric
BNO08xRptRVGeneric(uint8_t ID, EventBits_t rpt_bit, BNO08xPrivateTypes::bno08x_sync_ctx_t *sync_ctx)
Definition: BNO08xRptRVGeneric.hpp:24
BNO08xRptRVGeneric::tare
bool tare(bool x, bool y, bool z, sh2_TareBasis_t basis)
Tares vector basis according to axis flags.
Definition: BNO08xRptRVGeneric.cpp:74
BNO08xRptRVGeneric::get_euler
bno08x_euler_angle_t get_euler(bool in_degrees=true)
Grabs most recent rotation vector data in form of an euler angle, units are in degrees or rads.
Definition: BNO08xRptRVGeneric.cpp:50
BNO08xRptRVGeneric::data
bno08x_quat_t data
Definition: BNO08xRptRVGeneric.hpp:29
BNO08xRptRVGeneric::get_quat
bno08x_quat_t get_quat()
Grabs most recent rotation vector data in form of unit quaternion, rad accuracy units in radians (if ...
Definition: BNO08xRptRVGeneric.cpp:34
BNO08xPrivateTypes::bno08x_sync_ctx_t
Holds context used to synchronize tasks and callback execution.
Definition: BNO08xPrivateTypes.hpp:57
bno08x_euler_angle_t
Struct to represent euler angle (units in degrees or rads)
Definition: BNO08xGlobalTypes.hpp:528
bno08x_quat_t
Struct to represent unit quaternion.
Definition: BNO08xGlobalTypes.hpp:473