Class to represent and manage reports returned from BNO08x.
More...
#include <BNO08xRpt.hpp>
|
| static const constexpr float | RAD_2_DEG |
| | Constant for radian to degree conversions, sed in quaternion to euler function conversions.
|
| |
| static const constexpr char * | TAG = "BNO08xRpt" |
| |
Class to represent and manage reports returned from BNO08x.
◆ BNO08xRpt()
BNO08xRpt report constructor.
Construct a BNO08xRpt object for managing a BNO08x sensor report.
- Parameters
-
| imu | Pointer to BNO08x imu object. |
| report_ID | Report ID, ex. SH2_ACCELERATION. |
| rpt_bit | Respective enable bit for report in BNO08x::evt_grp_report_en. |
| period_us | The period/interval of the report in microseconds. |
- Returns
- void, nothing to return
◆ clear_sample_counts()
| bool BNO08xRpt::clear_sample_counts |
( |
| ) |
|
Clears BNO08x internal sample counts for this sensor. (see SH-2 ref manual 6.4.3.1)
- Returns
- True clear counts operation succeeded.
◆ disable()
Disables a sensor report by setting its period to 0us such that the BNO08x stops sending it.
- Parameters
-
| sensor_ID | The ID of the sensor for the respective report to be disabled. |
| sensor_cfg | Sensor special configuration. |
- Returns
- ESP_OK if report was successfully disabled.
◆ enable()
Enables a sensor report such that the BNO08x begins sending it.
- Parameters
-
- Returns
- True if report was successfully enabled.
◆ flush()
| bool BNO08xRpt::flush |
( |
| ) |
|
Flush all buffered reports for this sensor/report module.
- Returns
- True if flush operation succeeded.
◆ get_meta_data()
Retrieves meta data for this sensor/report by reading respective record in FRS (flash record system).
Can be used to retrieve the minimum period, maximum period, actual Q points, resolution, and other info for a given sensor.
- Returns
- True clear get meta data operation succeeded.
◆ get_sample_counts()
Gets sample counts for this sensor (see SH-2 ref manual 6.4.3.1)
- Parameters
-
| Struct | to store requested data. |
- Returns
- True get counts operation succeeded.
◆ has_new_data()
| bool BNO08xRpt::has_new_data |
( |
| ) |
|
Checks if a new report has been received since the last time this function was called.
- Returns
- True if a new report was received since the last time this function was called.
◆ lock_sh2_HAL()
| void BNO08xRpt::lock_sh2_HAL |
( |
| ) |
|
|
protected |
Locks sh2 HAL lib to only allow the calling task to call its APIs.
- Returns
- void, nothing to return
◆ lock_user_data()
| void BNO08xRpt::lock_user_data |
( |
| ) |
|
|
protected |
Locks locks user data to only allow the calling task to read/modify it.
- Returns
- void, nothing to return
◆ register_cb()
| bool BNO08xRpt::register_cb |
( |
std::function< void(void)> | cb_fxn | ) |
|
Registers a callback to execute when new data from a specific report is received.
- Parameters
-
| cb_fxn | Pointer to the call-back function should be of void return type void input param. |
- Returns
- void, nothing to return
◆ signal_data_available()
| void BNO08xRpt::signal_data_available |
( |
| ) |
|
|
protected |
◆ unlock_sh2_HAL()
| void BNO08xRpt::unlock_sh2_HAL |
( |
| ) |
|
|
protected |
Unlocks sh2 HAL lib to allow other tasks to call its APIs.
- Returns
- void, nothing to return
◆ unlock_user_data()
| void BNO08xRpt::unlock_user_data |
( |
| ) |
|
|
protected |
Unlocks user data to allow other tasks to read/modify it.
- Returns
- void, nothing to return
◆ update_data()
| virtual void BNO08xRpt::update_data |
( |
sh2_SensorValue_t * | sensor_val | ) |
|
|
protectedpure virtual |
Implemented in BNO08xRptAcceleration, BNO08xRptActivityClassifier, BNO08xRptARVRStabilizedGameRV, BNO08xRptARVRStabilizedRV, BNO08xRptCalGyro, BNO08xRptCalMagnetometer, BNO08xRptGameRV, BNO08xRptGravity, BNO08xRptIGyroRV, BNO08xRptLinearAcceleration, BNO08xRptRawMEMSAccelerometer, BNO08xRptRawMEMSGyro, BNO08xRptRawMEMSMagnetometer, BNO08xRptRV, BNO08xRptRVGeomag, BNO08xRptShakeDetector, BNO08xRptStabilityClassifier, BNO08xRptStepCounter, BNO08xRptTapDetector, BNO08xRptUncalGyro, and BNO08xRptUncalMagnetometer.
◆ BNO08x
◆ ID
Report ID, ex. SH2_ACCELERATION.
◆ period_us
| uint32_t BNO08xRpt::period_us |
|
protected |
The period/interval of the report in microseconds.
◆ RAD_2_DEG
| const constexpr float BNO08xRpt::RAD_2_DEG |
|
staticconstexprprotected |
Initial value:
Constant for radian to degree conversions, sed in quaternion to euler function conversions.
◆ rpt_bit
| EventBits_t BNO08xRpt::rpt_bit |
|
protected |
Respective enable and data bit for report in evt_grp_rpt_en and evt_grp_rpt_data.
◆ sync_ctx
◆ TAG
| const constexpr char* BNO08xRpt::TAG = "BNO08xRpt" |
|
staticconstexprprotected |
The documentation for this class was generated from the following files: