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

Loading...
Searching...
No Matches
BNO08xRptRVGeneric.hpp
Go to the documentation of this file.
#pragma once
#include "BNO08xRpt.hpp"
class BNO08xRptRVGeneric : public BNO08xRpt
{
public:
bool enable(
uint32_t time_between_reports, sh2_SensorConfig_t sensor_cfg = BNO08xPrivateTypes::default_sensor_cfg) override;
bno08x_quat_t get_quat();
bno08x_euler_angle_t get_euler(bool in_degrees = true);
protected:
BNO08xRptRVGeneric(uint8_t ID, EventBits_t rpt_bit, BNO08xPrivateTypes::bno08x_sync_ctx_t* sync_ctx)
: BNO08xRpt(ID, rpt_bit, sync_ctx)
{
}
bool tare(bool x, bool y, bool z, sh2_TareBasis_t basis);
bno08x_quat_t data;
static const constexpr char* TAG = "BNO08xRptRVGeneric";
};
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::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_euler_angle_t
Struct to represent euler angle (units in degrees or rads)
Definition BNO08xGlobalTypes.hpp:214
bno08x_quat_t
Struct to represent unit quaternion.
Definition BNO08xGlobalTypes.hpp:159