15#include "sh2_SensorValue.h"
73 static const constexpr char*
TAG =
"BNO08xRpt";
BNO08x IMU driver class.
Definition BNO08x.hpp:33
Class to represent and manage reports returned from BNO08x.
Definition BNO08xRpt.hpp:24
bool clear_sample_counts()
Clears BNO08x internal sample counts for this sensor. (see SH-2 ref manual 6.4.3.1)
Definition BNO08xRpt.cpp:173
BNO08xRpt(uint8_t ID, EventBits_t rpt_bit, BNO08xPrivateTypes::bno08x_sync_ctx_t *sync_ctx)
BNO08xRpt report constructor.
Definition BNO08xRpt.hpp:55
uint32_t period_us
The period/interval of the report in microseconds.
Definition BNO08xRpt.hpp:38
static const constexpr float RAD_2_DEG
Constant for radian to degree conversions, sed in quaternion to euler function conversions.
Definition BNO08xRpt.hpp:70
void unlock_user_data()
Unlocks user data to allow other tasks to read/modify it.
Definition BNO08xRpt.cpp:244
static const constexpr char * TAG
Definition BNO08xRpt.hpp:73
bool enable(uint32_t time_between_reports, sh2_SensorConfig_t sensor_cfg=BNO08xPrivateTypes::default_sensor_cfg)
Enables a sensor report such that the BNO08x begins sending it.
Definition BNO08xRpt.cpp:17
void signal_data_available()
Signals to BNO08x::data_available() that a new report has arrived.
Definition BNO08xRpt.cpp:254
void lock_user_data()
Locks locks user data to only allow the calling task to read/modify it.
Definition BNO08xRpt.cpp:234
BNO08xPrivateTypes::bno08x_sync_ctx_t * sync_ctx
Definition BNO08xRpt.hpp:39
bool register_cb(std::function< void(void)> cb_fxn)
Registers a callback to execute when new data from a specific report is received.
Definition BNO08xRpt.cpp:96
void unlock_sh2_HAL()
Unlocks sh2 HAL lib to allow other tasks to call its APIs.
Definition BNO08xRpt.cpp:224
uint8_t ID
Report ID, ex. SH2_ACCELERATION.
Definition BNO08xRpt.hpp:36
bool has_new_data()
Checks if a new report has been received since the last time this function was called.
Definition BNO08xRpt.cpp:112
void lock_sh2_HAL()
Locks sh2 HAL lib to only allow the calling task to call its APIs.
Definition BNO08xRpt.cpp:214
bool get_sample_counts(bno08x_sample_counts_t &sample_counts)
Gets sample counts for this sensor (see SH-2 ref manual 6.4.3.1)
Definition BNO08xRpt.cpp:148
bool disable(sh2_SensorConfig_t sensor_cfg=BNO08xPrivateTypes::default_sensor_cfg)
Disables a sensor report by setting its period to 0us such that the BNO08x stops sending it.
Definition BNO08xRpt.cpp:58
virtual void update_data(sh2_SensorValue_t *sensor_val)=0
bool flush()
Flush all buffered reports for this sensor/report module.
Definition BNO08xRpt.cpp:130
bool get_meta_data(bno08x_meta_data_t &meta_data)
Retrieves meta data for this sensor/report by reading respective record in FRS (flash record system).
Definition BNO08xRpt.cpp:193
EventBits_t rpt_bit
Respective enable and data bit for report in evt_grp_rpt_en and evt_grp_rpt_data.
Definition BNO08xRpt.hpp:37
static sh2_SensorConfig default_sensor_cfg
Definition BNO08xPrivateTypes.hpp:125
Holds context used to synchronize tasks and callback execution.
Definition BNO08xPrivateTypes.hpp:57
Struct to represent sample counts, returned from BNO08xRpt::get_sample_counts()
Definition BNO08xGlobalTypes.hpp:704