|
esp32_BNO08x 1.31
C++ BNO08x IMU driver component for esp-idf.
|
#include <math.h>#include <inttypes.h>#include <stdint.h>#include <cstring>#include <driver/gpio.h>#include <driver/spi_common.h>#include <driver/spi_master.h>#include "sh2_SensorValue.h"

Go to the source code of this file.
Classes | |
| struct | bno08x_config_t |
| IMU configuration settings passed into constructor. More... | |
| struct | bno08x_quat_t |
| Struct to represent unit quaternion. More... | |
| struct | bno08x_euler_angle_t |
| Struct to represent euler angle (units in degrees or rads) More... | |
| struct | bno08x_ang_vel_t |
| Struct to represent angular velocity (units in rad/s) More... | |
| struct | bno08x_magf_t |
| Struct to represent magnetic field data (units in uTesla) More... | |
| struct | bno08x_magf_bias_t |
| Struct to represent magnetic field bias data (units in uTesla) More... | |
| struct | bno08x_gyro_t |
| Struct to represent gyro data (units in rad/s) More... | |
| struct | bno08x_gyro_bias_t |
| Struct to represent gyro bias data (units in rad/s) More... | |
| struct | bno08x_activity_classifier_t |
| Struct to represent activity classifier data. More... | |
| struct | bno08x_tap_detector_t |
| Struct to represent tap detector data (flag meaning: 0 = no tap, 1 = positive tap on axis, -1 = negative tap on axis) More... | |
| struct | bno08x_shake_detector_t |
| Struct to represent shake detector data (flag meaning: 0 = no shake 1 = shake detected) More... | |
| struct | bno08x_accel_t |
| Struct to represent acceleration data from acceleration, linear acceleration, and gravity reports. More... | |
| struct | bno08x_step_counter_t |
| Struct to represent step counter data from step counter reports. More... | |
| struct | bno08x_raw_gyro_t |
| Struct to represent raw mems gyro data from raw gyro reports (units in ADC counts). More... | |
| struct | bno08x_raw_accel_t |
| Struct to represent raw mems accelerometer data from raw accelerometer reports (units in ADC counts). More... | |
| struct | bno08x_raw_magf_t |
| Struct to represent raw mems magnetometer data from raw magnetometer reports (units in ADC counts). More... | |
| struct | bno08x_stability_classifier_t |
| Struct to represent stability classifier data from stability classifier reports. More... | |
| struct | bno08x_sample_counts_t |
| Struct to represent sample counts, returned from BNO08xRpt::get_sample_counts() More... | |
| struct | bno08x_meta_data_t |
| Struct to represent sensor/report meta data, returned from BNO08xRpt::get_meta_data() More... | |
Macros | |
| #define | TAP_DETECTED_X_AXIS(tap) ((tap) & (1U << 0U) ? 1 : 0) |
| #define | TAP_DETECTED_X_AXIS_POSITIVE(tap) ((tap) & (1U << 1U) ? 1 : 0) |
| #define | TAP_DETECTED_Y_AXIS(tap) ((tap) & (1U << 2U) ? 1 : 0) |
| #define | TAP_DETECTED_Y_AXIS_POSITIVE(tap) ((tap) & (1U << 3U) ? 1 : 0) |
| #define | TAP_DETECTED_Z_AXIS(tap) ((tap) & (1U << 4U) ? 1 : 0) |
| #define | TAP_DETECTED_Z_AXIS_POSITIVE(tap) ((tap) & (1U << 5U) ? 1 : 0) |
| #define | TAP_DETECTED_DOUBLE(tap) ((tap) & (1U << 6U) ? 1 : 0) |
| #define | SHAKE_DETECTED_X(tap) ((tap) & (1U << 0U) ? 1 : 0) |
| #define | SHAKE_DETECTED_Y(tap) ((tap) & (1U << 1U) ? 1 : 0) |
| #define | SHAKE_DETECTED_Z(tap) ((tap) & (1U << 2U) ? 1 : 0) |
Typedefs | |
| typedef struct bno08x_config_t | bno08x_config_t |
| IMU configuration settings passed into constructor. | |
| typedef bno08x_config_t | imu_config_t |
| using | IMUAccuracy = BNO08xAccuracy |
| typedef struct bno08x_quat_t | bno08x_quat_t |
| Struct to represent unit quaternion. | |
| typedef struct bno08x_euler_angle_t | bno08x_euler_angle_t |
| Struct to represent euler angle (units in degrees or rads) | |
| typedef struct bno08x_ang_vel_t | bno08x_ang_vel_t |
| Struct to represent angular velocity (units in rad/s) | |
| typedef struct bno08x_magf_t | bno08x_magf_t |
| Struct to represent magnetic field data (units in uTesla) | |
| typedef struct bno08x_magf_bias_t | bno08x_magf_bias_t |
| Struct to represent magnetic field bias data (units in uTesla) | |
| typedef struct bno08x_gyro_t | bno08x_gyro_t |
| Struct to represent gyro data (units in rad/s) | |
| typedef struct bno08x_gyro_bias_t | bno08x_gyro_bias_t |
| Struct to represent gyro bias data (units in rad/s) | |
| typedef struct bno08x_activity_classifier_t | bno08x_activity_classifier_t |
| Struct to represent activity classifier data. | |
| typedef struct bno08x_tap_detector_t | bno08x_tap_detector_t |
| Struct to represent tap detector data (flag meaning: 0 = no tap, 1 = positive tap on axis, -1 = negative tap on axis) | |
| typedef struct bno08x_shake_detector_t | bno08x_shake_detector_t |
| Struct to represent shake detector data (flag meaning: 0 = no shake 1 = shake detected) | |
| typedef struct bno08x_accel_t | bno08x_accel_t |
| Struct to represent acceleration data from acceleration, linear acceleration, and gravity reports. | |
| typedef struct bno08x_step_counter_t | bno08x_step_counter_t |
| Struct to represent step counter data from step counter reports. | |
| typedef struct bno08x_raw_gyro_t | bno08x_raw_gyro_t |
| Struct to represent raw mems gyro data from raw gyro reports (units in ADC counts). | |
| typedef struct bno08x_raw_accel_t | bno08x_raw_accel_t |
| Struct to represent raw mems accelerometer data from raw accelerometer reports (units in ADC counts). | |
| typedef struct bno08x_raw_magf_t | bno08x_raw_magf_t |
| Struct to represent raw mems magnetometer data from raw magnetometer reports (units in ADC counts). | |
| typedef struct bno08x_stability_classifier_t | bno08x_stability_classifier_t |
| Struct to represent stability classifier data from stability classifier reports. | |
| typedef struct bno08x_sample_counts_t | bno08x_sample_counts_t |
| Struct to represent sample counts, returned from BNO08xRpt::get_sample_counts() | |
| typedef struct bno08x_meta_data_t | bno08x_meta_data_t |
| Struct to represent sensor/report meta data, returned from BNO08xRpt::get_meta_data() | |
Enumerations | |
| enum class | BNO08xCalSel { accelerometer = SH2_CAL_ACCEL , gyro = SH2_CAL_GYRO , magnetometer = SH2_CAL_MAG , planar_accelerometer = SH2_CAL_PLANAR , all = (SH2_CAL_ACCEL | SH2_CAL_GYRO | SH2_CAL_MAG | SH2_CAL_PLANAR) } |
| enum class | BNO08xResetReason { UNDEFINED , POR , INT_RST , WTD , EXT_RST , OTHER } |
| Reason for previous IMU reset (returned by get_reset_reason()) More... | |
| enum class | BNO08xAccuracy { UNRELIABLE , LOW , MED , HIGH , UNDEFINED } |
| Sensor accuracy returned from input reports, corresponds to status bits (see ref. manual 6.5.1) More... | |
| enum class | BNO08xActivityEnable { UNKNOWN = (1U << 0U) , IN_VEHICLE = (1U << 1U) , ON_BICYCLE = (1U << 2U) , ON_FOOT = (1U << 3U) , STILL = (1U << 4U) , TILTING = (1U << 5U) , WALKING = (1U << 6U) , RUNNING = (1U << 7U) , ON_STAIRS = (1U << 8U) , ALL = 0x1FU } |
| BNO08xActivity Classifier enable bits passed to enable_activity_classifier() More... | |
| enum class | BNO08xActivity { UNKNOWN = 0 , IN_VEHICLE = 1 , ON_BICYCLE = 2 , ON_FOOT = 3 , STILL = 4 , TILTING = 5 , WALKING = 6 , RUNNING = 7 , ON_STAIRS = 8 , UNDEFINED = 9 } |
| BNO08xActivity states returned from BNO08x::activity_classifier.get() More... | |
| enum class | BNO08xStability { UNKNOWN = 0 , ON_TABLE = 1 , STATIONARY = 2 , STABLE = 3 , MOTION = 4 , RESERVED = 5 , UNDEFINED = 6 } |
| BNO08xStability states returned from BNO08x::stability_classifier.get() More... | |
Variables | |
| static const constexpr uint8_t | TOTAL_RPT_COUNT = 38 |
| Amount of possible reports returned from BNO08x. | |
| #define SHAKE_DETECTED_X | ( | tap | ) | ((tap) & (1U << 0U) ? 1 : 0) |
| #define SHAKE_DETECTED_Y | ( | tap | ) | ((tap) & (1U << 1U) ? 1 : 0) |
| #define SHAKE_DETECTED_Z | ( | tap | ) | ((tap) & (1U << 2U) ? 1 : 0) |
| #define TAP_DETECTED_DOUBLE | ( | tap | ) | ((tap) & (1U << 6U) ? 1 : 0) |
| #define TAP_DETECTED_X_AXIS | ( | tap | ) | ((tap) & (1U << 0U) ? 1 : 0) |
| #define TAP_DETECTED_X_AXIS_POSITIVE | ( | tap | ) | ((tap) & (1U << 1U) ? 1 : 0) |
| #define TAP_DETECTED_Y_AXIS | ( | tap | ) | ((tap) & (1U << 2U) ? 1 : 0) |
| #define TAP_DETECTED_Y_AXIS_POSITIVE | ( | tap | ) | ((tap) & (1U << 3U) ? 1 : 0) |
| #define TAP_DETECTED_Z_AXIS | ( | tap | ) | ((tap) & (1U << 4U) ? 1 : 0) |
| #define TAP_DETECTED_Z_AXIS_POSITIVE | ( | tap | ) | ((tap) & (1U << 5U) ? 1 : 0) |
| typedef struct bno08x_accel_t bno08x_accel_t |
Struct to represent acceleration data from acceleration, linear acceleration, and gravity reports.
| typedef struct bno08x_activity_classifier_t bno08x_activity_classifier_t |
Struct to represent activity classifier data.
| typedef struct bno08x_ang_vel_t bno08x_ang_vel_t |
Struct to represent angular velocity (units in rad/s)
| typedef struct bno08x_config_t bno08x_config_t |
IMU configuration settings passed into constructor.
| typedef struct bno08x_euler_angle_t bno08x_euler_angle_t |
Struct to represent euler angle (units in degrees or rads)
| typedef struct bno08x_gyro_bias_t bno08x_gyro_bias_t |
Struct to represent gyro bias data (units in rad/s)
| typedef struct bno08x_gyro_t bno08x_gyro_t |
Struct to represent gyro data (units in rad/s)
| typedef struct bno08x_magf_bias_t bno08x_magf_bias_t |
Struct to represent magnetic field bias data (units in uTesla)
| typedef struct bno08x_magf_t bno08x_magf_t |
Struct to represent magnetic field data (units in uTesla)
| typedef struct bno08x_meta_data_t bno08x_meta_data_t |
Struct to represent sensor/report meta data, returned from BNO08xRpt::get_meta_data()
| typedef struct bno08x_quat_t bno08x_quat_t |
Struct to represent unit quaternion.
| typedef struct bno08x_raw_accel_t bno08x_raw_accel_t |
Struct to represent raw mems accelerometer data from raw accelerometer reports (units in ADC counts).
| typedef struct bno08x_raw_gyro_t bno08x_raw_gyro_t |
Struct to represent raw mems gyro data from raw gyro reports (units in ADC counts).
| typedef struct bno08x_raw_magf_t bno08x_raw_magf_t |
Struct to represent raw mems magnetometer data from raw magnetometer reports (units in ADC counts).
| typedef struct bno08x_sample_counts_t bno08x_sample_counts_t |
Struct to represent sample counts, returned from BNO08xRpt::get_sample_counts()
| typedef struct bno08x_shake_detector_t bno08x_shake_detector_t |
Struct to represent shake detector data (flag meaning: 0 = no shake 1 = shake detected)
| typedef struct bno08x_stability_classifier_t bno08x_stability_classifier_t |
Struct to represent stability classifier data from stability classifier reports.
| typedef struct bno08x_step_counter_t bno08x_step_counter_t |
Struct to represent step counter data from step counter reports.
| typedef struct bno08x_tap_detector_t bno08x_tap_detector_t |
Struct to represent tap detector data (flag meaning: 0 = no tap, 1 = positive tap on axis, -1 = negative tap on axis)
| typedef bno08x_config_t imu_config_t |
| using IMUAccuracy = BNO08xAccuracy |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Reason for previous IMU reset (returned by get_reset_reason())
|
strong |
|
staticconstexpr |
Amount of possible reports returned from BNO08x.