diff --git a/README.md b/README.md index 7afcbb5..4bd2127 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ To access the menu: 2. Scroll down to the esp_BNO08x menu and enter it, if you're using vsCode you may have to use the "j" and "k" keys instead of the arrow keys.  -3. Modify whatever settings you'd like from the sub menus. The GPIO Configuration menu allows for the default GPIO pins to be modified, the SPI Configuration menu allows for the default SCLK frequency and host peripheral to be modified. +3. Modify whatever settings you'd like from the sub menus. The GPIO Configuration menu allows for the default GPIO pins to be modified, the SPI Configuration menu allows for the default host peripheral, SCLK frequency, and queue size to be modified, the Logging menu allows for the enabling and disabling of log/print statements, and the Callbacks menu allows for the default size of the call-back execution task to be modified. 
@@ -199,7 +199,7 @@ extern "C" void app_main(void) ## Unit Tests A basic unit testing suite is included with this library, but it is very rudimentary. -It can be used to verify some of the basic features of a BNO08x device. +It can be used to verify some of the basic features of a BNO08x device and this library. ### Running Tests diff --git a/README_images/esp32_BNO08x_menuconfig_1.png b/README_images/esp32_BNO08x_menuconfig_1.png index bb8ee15..18a638e 100644 Binary files a/README_images/esp32_BNO08x_menuconfig_1.png and b/README_images/esp32_BNO08x_menuconfig_1.png differ diff --git a/README_images/esp32_BNO08x_menuconfig_2.png b/README_images/esp32_BNO08x_menuconfig_2.png index 6cc7f43..7c58b3d 100644 Binary files a/README_images/esp32_BNO08x_menuconfig_2.png and b/README_images/esp32_BNO08x_menuconfig_2.png differ diff --git a/documentation/html/_b_n_o08x_8cpp.html b/documentation/html/_b_n_o08x_8cpp.html new file mode 100644 index 0000000..3aad18e --- /dev/null +++ b/documentation/html/_b_n_o08x_8cpp.html @@ -0,0 +1,163 @@ + + + + + + + +|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+

|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
#include <inttypes.h>#include <math.h>#include <stdio.h>#include <cstring>#include <functional>#include <vector>#include <esp_log.h>#include <esp_rom_gpio.h>#include <esp_timer.h>#include <freertos/FreeRTOS.h>#include <freertos/task.h>#include <freertos/event_groups.h>#include <freertos/queue.h>#include <freertos/semphr.h>#include <rom/ets_sys.h>#include "BNO08x_global_types.hpp"

Go to the source code of this file.
++Classes | |
| class | BNO08x |
| BNO08x IMU driver class. More... | |
| struct | BNO08x::bno08x_rx_packet_t |
| Holds data that is received over spi. More... | |
| struct | BNO08x::bno08x_tx_packet_t |
| Holds data that is sent over spi. More... | |
| struct | BNO08x::bno08x_report_period_tracker_t |
| struct | BNO08x::bno08x_init_status_t |
| Holds info about which functionality has been successfully initialized (used by deconstructor during cleanup). More... | |
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
#include <driver/gpio.h>#include <driver/spi_common.h>#include <driver/spi_master.h>

Go to the source code of this file.
++Classes | |
| struct | bno08x_config_t |
| IMU configuration settings passed into constructor. More... | |
+Typedefs | |
| using | IMUAccuracy = BNO08xAccuracy |
| using | IMUResetReason = BNO08xResetReason |
| typedef struct bno08x_config_t | bno08x_config_t |
| IMU configuration settings passed into constructor. | |
| typedef bno08x_config_t | imu_config_t |
+Enumerations | |
| enum class | BNO08xAccuracy { LOW = 1 +, MED +, HIGH +, UNDEFINED + } |
| Sensor accuracy returned during sensor calibration. More... | |
| enum class | BNO08xResetReason { + UNDEFINED +, POR +, INT_RST +, WTD +, + EXT_RST +, OTHER + + } |
| Reason for previous IMU reset (returned by get_reset_reason()) 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 get_activity_classifier() More... | |
| enum class | BNO08xStability { UNKNOWN = 0 +, ON_TABLE = 1 +, STATIONARY = 2 +, UNDEFINED = 3 + } |
| BNO08xStability states returned from get_stability_classifier() More... | |
| typedef struct bno08x_config_t bno08x_config_t | +
IMU configuration settings passed into constructor.
+ +| typedef bno08x_config_t imu_config_t | +
| using IMUAccuracy = BNO08xAccuracy | +
| using IMUResetReason = BNO08xResetReason | +
+
|
+ +strong | +
+
|
+ +strong | +
+
|
+ +strong | +
+
|
+ +strong | +
Reason for previous IMU reset (returned by get_reset_reason())
+
+
|
+ +strong | +
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
#include <inttypes.h>#include <freertos/FreeRTOS.h>#include <freertos/event_groups.h>

Go to the source code of this file.
++Macros | |
| #define | CHECK_TASKS_RUNNING(evt_grp_task_flow, running_bit) ((xEventGroupGetBits(evt_grp_task_flow) & (running_bit)) != 0) |
| Clears the most significant byte of a 16-bit value. | |
| #define | UINT16_CLR_MSB(val_16bit) ((val_16bit) & 0x00FFU) |
| Clears the most significant byte of a 16-bit value. | |
| #define | UINT16_CLR_LSB(val_16bit) ((val_16bit) & 0xFF00U) |
| Clears the least significant byte of a 16-bit value. | |
| #define | UINT32_CLR_BYTE(val_32bit, byte2clear) ((val_32bit) & ~(0xFFUL << (byte2clear * 8UL))) |
| Clears a specified byte in a 32-bit value. | |
| #define | UINT32_MSK_BYTE(val_32bit, byte2mask) ((val_32bit) & (0xFFUL << (byte2mask * 8UL))) |
| Masks a specified byte in a 32-bit value. | |
| #define | PARSE_PACKET_LENGTH(packet_ptr) (UINT16_CLR_LSB(static_cast<uint16_t>(packet_ptr->header[1]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet_ptr->header[0]))) |
| Parse length from SHTP packet header. | |
| #define | PARSE_PACKET_TIMESTAMP(packet_ptr) |
| Parse timestamp from SHTP packet. | |
| #define | PARSE_PRODUCT_ID_REPORT_RESET_REASON(packet_ptr) UINT32_MSK_BYTE(static_cast<uint32_t>(packet_ptr->body[1]), 0UL) |
| Parse reset reason from SHTP packet containing product ID report. | |
| #define | PARSE_PRODUCT_ID_REPORT_SW_PART_NO(packet_ptr) |
| Parse sw part number from SHTP packet containing product ID report. | |
| #define | PARSE_PRODUCT_ID_REPORT_SW_BUILD_NO(packet_ptr) |
| Parse sw build number from SHTP packet containing product ID report. | |
| #define | PARSE_PRODUCT_ID_REPORT_SW_VERSION_PATCH(packet_ptr) (UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[13]) << 8UL, 1UL) | UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[12]), 0UL)) |
| Parse sw version patch from SHTP packet containing product ID report. | |
| #define | PARSE_PRODUCT_ID_REPORT_PRODUCT_ID(packet_ptr) UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[0]), 0UL) |
| Parse product ID SHTP packet containing product ID report. | |
| #define | PARSE_PRODUCT_ID_REPORT_SW_VERSION_MAJOR(packet_ptr) UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[2]), 0UL) |
| Parse product sw version major containing product ID report. | |
| #define | PARSE_PRODUCT_ID_REPORT_SW_VERSION_MINOR(packet_ptr) UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[3]), 0UL) |
| Parse product sw version minor containing product ID report. | |
| #define | PARSE_GYRO_REPORT_RAW_QUAT_I(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[1]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[0]))) |
| Parse quat I data from integrated gyro rotation vector report. | |
| #define | PARSE_GYRO_REPORT_RAW_QUAT_J(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[3]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[2]))) |
| Parse quat J data from integrated gyro rotation vector report. | |
| #define | PARSE_GYRO_REPORT_RAW_QUAT_K(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[4]))) |
| Parse quat K data from integrated gyro rotation vector report. | |
| #define | PARSE_GYRO_REPORT_RAW_QUAT_REAL(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[7]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[6]))) |
| Parse quat real data from integrated gyro rotation vector report. | |
| #define | PARSE_GYRO_REPORT_RAW_GYRO_VEL_X(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[9]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[8]))) |
| Parse x axis velocity data from integrated gyro rotation vector report. | |
| #define | PARSE_GYRO_REPORT_RAW_GYRO_VEL_Y(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[11]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[10]))) |
| Parse y axis velocity data from integrated gyro rotation vector report. | |
| #define | PARSE_GYRO_REPORT_RAW_GYRO_VEL_Z(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[13]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[12]))) |
| Parse z axis velocity data from integrated gyro rotation vector report. | |
| #define | PARSE_INPUT_REPORT_STATUS_BITS(packet) (packet->body[5 + 2] & 0x03U) |
| Parse status bits from input report. | |
| #define | PARSE_INPUT_REPORT_REPORT_ID(packet) UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5])) |
| Parse report ID from input report. | |
| #define | PARSE_INPUT_REPORT_DATA_1(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 5]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 4]))) |
| Parse first data block from input report. | |
| #define | PARSE_INPUT_REPORT_DATA_2(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 7]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 6]))) |
| Parse second data block from input report. | |
| #define | PARSE_INPUT_REPORT_DATA_3(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 9]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 8]))) |
| Parse third data block from input report. | |
| #define | PARSE_INPUT_REPORT_DATA_4(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 11]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 10]))) |
| Parse fourth data block from input report. | |
| #define | PARSE_INPUT_REPORT_DATA_5(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 13]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 12]))) |
| Parse fifth data block from input report. | |
| #define | PARSE_INPUT_REPORT_DATA_6(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 15]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 14]))) |
| Parse sixth data block from input report. | |
| #define | IS_ROTATION_VECTOR_REPORT(packet) |
| Checks if packet containing input report is a rotation vector report. | |
| #define | PARSE_FRS_READ_RESPONSE_REPORT_RECORD_ID(packet_body) (UINT16_CLR_LSB(static_cast<uint16_t>(packet_body[13]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet_body[12]))) |
| Parse FRS record ID from FRS read response report. | |
| #define | PARSE_FRS_READ_RESPONSE_REPORT_DATA_1(packet_body) |
| Parse data block 1 from FRS read response report. | |
| #define | PARSE_FRS_READ_RESPONSE_REPORT_DATA_2(packet_body) |
| Parse data block 2 from FRS read response report. | |
| #define CHECK_TASKS_RUNNING | +( | +evt_grp_task_flow, | +|
| + | + | running_bit ) ((xEventGroupGetBits(evt_grp_task_flow) & (running_bit)) != 0) | +
Clears the most significant byte of a 16-bit value.
+| evt_grp_task_flow | Task flow event group handle. |
| running_bit | EVT_GRP_TSK_FLW_RUNNING_BIT |
| #define IS_ROTATION_VECTOR_REPORT | +( | +packet | ) | ++ |
Checks if packet containing input report is a rotation vector report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_FRS_READ_RESPONSE_REPORT_DATA_1 | +( | +packet_body | ) | ++ |
Parse data block 1 from FRS read response report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_FRS_READ_RESPONSE_REPORT_DATA_2 | +( | +packet_body | ) | ++ |
Parse data block 2 from FRS read response report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_FRS_READ_RESPONSE_REPORT_RECORD_ID | +( | +packet_body | ) | +(UINT16_CLR_LSB(static_cast<uint16_t>(packet_body[13]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet_body[12]))) | +
Parse FRS record ID from FRS read response report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_GYRO_REPORT_RAW_GYRO_VEL_X | +( | +packet | ) | +(UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[9]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[8]))) | +
Parse x axis velocity data from integrated gyro rotation vector report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_GYRO_REPORT_RAW_GYRO_VEL_Y | +( | +packet | ) | +(UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[11]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[10]))) | +
Parse y axis velocity data from integrated gyro rotation vector report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_GYRO_REPORT_RAW_GYRO_VEL_Z | +( | +packet | ) | +(UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[13]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[12]))) | +
Parse z axis velocity data from integrated gyro rotation vector report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_GYRO_REPORT_RAW_QUAT_I | +( | +packet | ) | +(UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[1]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[0]))) | +
Parse quat I data from integrated gyro rotation vector report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_GYRO_REPORT_RAW_QUAT_J | +( | +packet | ) | +(UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[3]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[2]))) | +
Parse quat J data from integrated gyro rotation vector report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_GYRO_REPORT_RAW_QUAT_K | +( | +packet | ) | +(UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[4]))) | +
Parse quat K data from integrated gyro rotation vector report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_GYRO_REPORT_RAW_QUAT_REAL | +( | +packet | ) | +(UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[7]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[6]))) | +
Parse quat real data from integrated gyro rotation vector report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_INPUT_REPORT_DATA_1 | +( | +packet | ) | +(UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 5]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 4]))) | +
Parse first data block from input report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_INPUT_REPORT_DATA_2 | +( | +packet | ) | +(UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 7]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 6]))) | +
Parse second data block from input report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_INPUT_REPORT_DATA_3 | +( | +packet | ) | +(UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 9]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 8]))) | +
Parse third data block from input report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_INPUT_REPORT_DATA_4 | +( | +packet | ) | +(UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 11]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 10]))) | +
Parse fourth data block from input report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_INPUT_REPORT_DATA_5 | +( | +packet | ) | +(UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 13]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 12]))) | +
Parse fifth data block from input report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_INPUT_REPORT_DATA_6 | +( | +packet | ) | +(UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 15]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 14]))) | +
Parse sixth data block from input report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_INPUT_REPORT_REPORT_ID | +( | +packet | ) | +UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5])) | +
Parse report ID from input report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_INPUT_REPORT_STATUS_BITS | +( | +packet | ) | +(packet->body[5 + 2] & 0x03U) | +
Parse status bits from input report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_PACKET_LENGTH | +( | +packet_ptr | ) | +(UINT16_CLR_LSB(static_cast<uint16_t>(packet_ptr->header[1]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet_ptr->header[0]))) | +
Parse length from SHTP packet header.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_PACKET_TIMESTAMP | +( | +packet_ptr | ) | ++ |
Parse timestamp from SHTP packet.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_PRODUCT_ID_REPORT_PRODUCT_ID | +( | +packet_ptr | ) | +UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[0]), 0UL) | +
Parse product ID SHTP packet containing product ID report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_PRODUCT_ID_REPORT_RESET_REASON | +( | +packet_ptr | ) | +UINT32_MSK_BYTE(static_cast<uint32_t>(packet_ptr->body[1]), 0UL) | +
Parse reset reason from SHTP packet containing product ID report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_PRODUCT_ID_REPORT_SW_BUILD_NO | +( | +packet_ptr | ) | ++ |
Parse sw build number from SHTP packet containing product ID report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_PRODUCT_ID_REPORT_SW_PART_NO | +( | +packet_ptr | ) | ++ |
Parse sw part number from SHTP packet containing product ID report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_PRODUCT_ID_REPORT_SW_VERSION_MAJOR | +( | +packet_ptr | ) | +UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[2]), 0UL) | +
Parse product sw version major containing product ID report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_PRODUCT_ID_REPORT_SW_VERSION_MINOR | +( | +packet_ptr | ) | +UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[3]), 0UL) | +
Parse product sw version minor containing product ID report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define PARSE_PRODUCT_ID_REPORT_SW_VERSION_PATCH | +( | +packet_ptr | ) | +(UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[13]) << 8UL, 1UL) | UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[12]), 0UL)) | +
Parse sw version patch from SHTP packet containing product ID report.
+| packet | Pointer to bno08x_rx_packet_t containing data. |
| #define UINT16_CLR_LSB | +( | +val_16bit | ) | +((val_16bit) & 0xFF00U) | +
Clears the least significant byte of a 16-bit value.
+| val_16bit | The 16-bit value to modify. |
| #define UINT16_CLR_MSB | +( | +val_16bit | ) | +((val_16bit) & 0x00FFU) | +
Clears the most significant byte of a 16-bit value.
+| val_16bit | The 16-bit value to modify. |
| #define UINT32_CLR_BYTE | +( | +val_32bit, | +|
| + | + | byte2clear ) ((val_32bit) & ~(0xFFUL << (byte2clear * 8UL))) | +
Clears a specified byte in a 32-bit value.
+| val_32bit | The 32-bit value to modify. |
| byte2clear | The byte index to clear (0 = LSB, 3 = MSB). |
| #define UINT32_MSK_BYTE | +( | +val_32bit, | +|
| + | + | byte2mask ) ((val_32bit) & (0xFFUL << (byte2mask * 8UL))) | +
Masks a specified byte in a 32-bit value.
+| val_32bit | The 32-bit value to modify. |
| byte2mask | The byte index to mask (0 = LSB, 3 = MSB). |
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+


Go to the source code of this file.
++Classes | |
| class | BNO08xTestHelper |
| BNO08x unit test helper class. More... | |
| struct | BNO08xTestHelper::imu_report_data_t |
| IMU configuration settings passed into constructor. More... | |
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+

Go to the source code of this file.
++Classes | |
| class | BNO08xTestSuite |
| BNO08x unit test launch point class. More... | |
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+

+Functions | |
| TEST_CASE ("BNO08x Driver Creation for [CallbackTests] Tests", "[CallbackTests]") | |
| imu | register_cb ([&imu, &new_data, &report_data, &prev_report_data, &msg_buff]() { static int cb_execution_cnt=0;cb_execution_cnt++;BNO08xTestHelper::update_report_data(&report_data);if(BNO08xTestHelper::accelerometer_data_is_new(&report_data, &prev_report_data)) { new_data=true;sprintf(msg_buff, "Rx Data Trial %d Success: AngularAccel: aX: %.2lf accel aY: %.2lf accel aZ: " "%.2lf Accuracy %s", cb_execution_cnt, report_data.accel_x, report_data.accel_y, report_data.accel_z, BNO08xTestHelper::BNO08xAccuracy_to_str(report_data.accel_accuracy));BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);} }) |
| imu | enable_accelerometer (REPORT_PERIOD) |
| for (int i=0;i< RX_REPORT_TRIAL_CNT;i++) | |
| imu | disable_accelerometer () |
| imu | register_cb ([&imu, &new_data, &report_data, &prev_report_data, &msg_buff]() { static int cb_execution_cnt=0;cb_execution_cnt++;BNO08xTestHelper::update_report_data(&report_data);if(BNO08xTestHelper::accelerometer_data_is_new(&report_data, &prev_report_data)) { new_data[0]=true;sprintf(msg_buff, "Rx Data Trial %d Success: AngularAccel: aX: %.2lf accel aY: %.2lf accel aZ: " "%.2lf Accuracy %s", cb_execution_cnt, report_data.accel_x, report_data.accel_y, report_data.accel_z, BNO08xTestHelper::BNO08xAccuracy_to_str(report_data.accel_accuracy));BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);} if(BNO08xTestHelper::linear_accelerometer_data_is_new(&report_data, &prev_report_data)) { new_data[1]=true;sprintf(msg_buff, "Rx Data Trial %d Success: LinearAccel: laX: %.2lf laY: %.2lf laZ: " "%.2lf Accuracy: %s",(cb_execution_cnt+1), report_data.lin_accel_x, report_data.lin_accel_y, report_data.lin_accel_z, BNO08xTestHelper::BNO08xAccuracy_to_str(report_data.lin_accel_accuracy));BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);} }) |
| imu | enable_linear_accelerometer (REPORT_PERIOD) |
| TEST_ASSERT_EQUAL (true, new_data[0]) | |
| TEST_ASSERT_EQUAL (true, new_data[1]) | |
| imu | disable_linear_accelerometer () |
| TEST_CASE ("BNO08x Driver Cleanup for [CallbackTests] Tests", "[CallbackTests]") | |
+Variables | |
| BNO08x * | imu = nullptr |
| BNO08xTestHelper::imu_report_data_t | report_data |
| BNO08xTestHelper::imu_report_data_t | prev_report_data |
| const constexpr uint8_t | RX_REPORT_TRIAL_CNT = 5 |
| const constexpr uint32_t | REPORT_PERIOD = 100000UL |
| bool | new_data = false |
| char | msg_buff [200] = {} |
| const constexpr uint8_t | ENABLED_REPORT_CNT = 2 |
| imu disable_accelerometer | +( | +) | ++ |
| imu disable_linear_accelerometer | +( | +) | ++ |
| imu enable_accelerometer | +( | +REPORT_PERIOD | ) | ++ |
| imu enable_linear_accelerometer | +( | +REPORT_PERIOD | ) | ++ |

| for | +( | +) | ++ |

| imu register_cb | +( | +[&imu, &new_data, &report_data, &prev_report_data, &msg_buff] () { static int cb_execution_cnt=0;cb_execution_cnt++;BNO08xTestHelper::update_report_data(&report_data);if(BNO08xTestHelper::accelerometer_data_is_new(&report_data, &prev_report_data)) { new_data=true;sprintf(msg_buff, "Rx Data Trial %d Success: AngularAccel: aX: %.2lf accel aY: %.2lf accel aZ: " "%.2lf Accuracy %s", cb_execution_cnt, report_data.accel_x, report_data.accel_y, report_data.accel_z, BNO08xTestHelper::BNO08xAccuracy_to_str(report_data.accel_accuracy));BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);} } | ) | ++ |

| imu register_cb | +( | +[&imu, &new_data, &report_data, &prev_report_data, &msg_buff] () { static int cb_execution_cnt=0;cb_execution_cnt++;BNO08xTestHelper::update_report_data(&report_data);if(BNO08xTestHelper::accelerometer_data_is_new(&report_data, &prev_report_data)) { new_data[0]=true;sprintf(msg_buff, "Rx Data Trial %d Success: AngularAccel: aX: %.2lf accel aY: %.2lf accel aZ: " "%.2lf Accuracy %s", cb_execution_cnt, report_data.accel_x, report_data.accel_y, report_data.accel_z, BNO08xTestHelper::BNO08xAccuracy_to_str(report_data.accel_accuracy));BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);} if(BNO08xTestHelper::linear_accelerometer_data_is_new(&report_data, &prev_report_data)) { new_data[1]=true;sprintf(msg_buff, "Rx Data Trial %d Success: LinearAccel: laX: %.2lf laY: %.2lf laZ: " "%.2lf Accuracy: %s",(cb_execution_cnt+1), report_data.lin_accel_x, report_data.lin_accel_y, report_data.lin_accel_z, BNO08xTestHelper::BNO08xAccuracy_to_str(report_data.lin_accel_accuracy));BNO08xTestHelper::print_test_msg(TEST_TAG, msg_buff);} } | ) | ++ |

| TEST_ASSERT_EQUAL | +( | +true | , | +
| + | + | new_data | [0] ) | +

| TEST_ASSERT_EQUAL | +( | +true | , | +
| + | + | new_data | [1] ) | +
| TEST_CASE | +( | +"BNO08x Driver Cleanup for Tests" | [CallbackTests], | +
| + | + | "" | [CallbackTests] ) | +

| TEST_CASE | +( | +"BNO08x Driver Creation for Tests" | [CallbackTests], | +
| + | + | "" | [CallbackTests] ) | +

+
|
+ +constexpr | +
| BNO08x * imu = nullptr | +
| char msg_buff = {} | +
| bool new_data = false | +
| BNO08xTestHelper::imu_report_data_t prev_report_data | +
| BNO08xTestHelper::update_report_data & report_data | +
+
|
+ +constexpr | +
+
|
+ +constexpr | +
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+

+Functions | |
| TEST_CASE ("Init Config Args", "[InitComprehensive]") | |
| TEST_CASE ("Init GPIO", "[InitComprehensive]") | |
| TEST_CASE ("Init HINT ISR", "[InitComprehensive]") | |
| TEST_CASE ("Init SPI", "[InitComprehensive]") | |
| TEST_CASE ("InitComprehensive Tasks", "[InitComprehensive]") | |
| TEST_CASE ("Finish Init", "[InitComprehensive]") | |
| TEST_CASE ("Init & Deinit", "[InitDenit]") | |
| TEST_CASE | +( | +"Finish Init" | , | +
| + | + | "" | [InitComprehensive] ) | +

| TEST_CASE | +( | +"Init & Deinit" | , | +
| + | + | "" | [InitDenit] ) | +

| TEST_CASE | +( | +"Init Config Args" | , | +
| + | + | "" | [InitComprehensive] ) | +

| TEST_CASE | +( | +"Init GPIO" | , | +
| + | + | "" | [InitComprehensive] ) | +

| TEST_CASE | +( | +"Init HINT ISR" | , | +
| + | + | "" | [InitComprehensive] ) | +

| TEST_CASE | +( | +"Init SPI" | , | +
| + | + | "" | [InitComprehensive] ) | +

| TEST_CASE | +( | +"InitComprehensive Tasks" | , | +
| + | + | "" | [InitComprehensive] ) | +

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

+Functions | |
| TEST_CASE ("BNO08x Driver Creation for [MultiReportEnableDisable] Tests", "[MultiReportEnableDisable]") | |
| TEST_CASE ("Dual Report Enable/Disable", "[MultiReportEnableDisable]") | |
| TEST_CASE ("Tri Report Enable/Disable", "[MultiReportEnableDisable]") | |
| TEST_CASE ("Quad Report Enable/Disable", "[MultiReportEnableDisable]") | |
| TEST_CASE ("Hex Report Enable", "[MultiReportEnableDisable]") | |
| TEST_CASE ("BNO08x Driver Cleanup for [MultiReportEnableDisable] Tests", "[MultiReportEnableDisable]") | |
| TEST_CASE | +( | +"BNO08x Driver Cleanup for Tests" | [MultiReportEnableDisable], | +
| + | + | "" | [MultiReportEnableDisable] ) | +

| TEST_CASE | +( | +"BNO08x Driver Creation for Tests" | [MultiReportEnableDisable], | +
| + | + | "" | [MultiReportEnableDisable] ) | +

| TEST_CASE | +( | +"Dual Report Enable/Disable" | , | +
| + | + | "" | [MultiReportEnableDisable] ) | +

| TEST_CASE | +( | +"Hex Report Enable" | , | +
| + | + | "" | [MultiReportEnableDisable] ) | +

| TEST_CASE | +( | +"Quad Report Enable/Disable" | , | +
| + | + | "" | [MultiReportEnableDisable] ) | +

| TEST_CASE | +( | +"Tri Report Enable/Disable" | , | +
| + | + | "" | [MultiReportEnableDisable] ) | +

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

+Functions | |
| TEST_CASE ("BNO08x Driver Creation for [SingleReportEnableDisable] Tests", "[SingleReportEnableDisable]") | |
| TEST_CASE ("Enable Incorrect Report", "[SingleReportEnableDisable]") | |
| TEST_CASE ("Enable/Disable Rotation Vector", "[SingleReportEnableDisable]") | |
| TEST_CASE ("Enable/Disable Game Rotation Vector", "[SingleReportEnableDisable]") | |
| TEST_CASE ("Enable/Disable ARVR Stabilized Rotation Vector", "[SingleReportEnableDisable]") | |
| TEST_CASE ("Enable/Disable ARVR Stabilized Game Rotation Vector", "[SingleReportEnableDisable]") | |
| TEST_CASE ("Enable/Disable Gyro Integrated Rotation Vector", "[SingleReportEnableDisable]") | |
| TEST_CASE ("Enable/Disable Uncalibrated Gyro", "[SingleReportEnableDisable]") | |
| TEST_CASE ("Enable/Disable Calibrated Gyro", "[SingleReportEnableDisable]") | |
| TEST_CASE ("Enable/Disable Accelerometer", "[SingleReportEnableDisable]") | |
| TEST_CASE ("Enable/Disable Linear Accelerometer", "[SingleReportEnableDisable]") | |
| TEST_CASE ("Enable/Disable Gravity", "[SingleReportEnableDisable]") | |
| TEST_CASE ("Enable/Disable Magnetometer", "[SingleReportEnableDisable]") | |
| TEST_CASE ("Enable/Disable Step Counter", "[SingleReportEnableDisable]") | |
| TEST_CASE ("Enable/Disable Stability Classifier", "[SingleReportEnableDisable]") | |
| TEST_CASE ("Enable/Disable Activity Classifier", "[SingleReportEnableDisable]") | |
| TEST_CASE ("BNO08x Driver Cleanup for [SingleReportEnableDisable] Tests", "[SingleReportEnableDisable]") | |
+Variables | |
| static const constexpr uint8_t | RX_REPORT_TRIAL_CNT = 5 |
| static const constexpr uint32_t | REPORT_PERIOD = 100000UL |
| TEST_CASE | +( | +"BNO08x Driver Cleanup for Tests" | [SingleReportEnableDisable], | +
| + | + | "" | [SingleReportEnableDisable] ) | +

| TEST_CASE | +( | +"BNO08x Driver Creation for Tests" | [SingleReportEnableDisable], | +
| + | + | "" | [SingleReportEnableDisable] ) | +

| TEST_CASE | +( | +"Enable Incorrect Report" | , | +
| + | + | "" | [SingleReportEnableDisable] ) | +

| TEST_CASE | +( | +"Enable/Disable Accelerometer" | , | +
| + | + | "" | [SingleReportEnableDisable] ) | +

| TEST_CASE | +( | +"Enable/Disable Activity Classifier" | , | +
| + | + | "" | [SingleReportEnableDisable] ) | +

| TEST_CASE | +( | +"Enable/Disable ARVR Stabilized Game Rotation Vector" | , | +
| + | + | "" | [SingleReportEnableDisable] ) | +

| TEST_CASE | +( | +"Enable/Disable ARVR Stabilized Rotation Vector" | , | +
| + | + | "" | [SingleReportEnableDisable] ) | +

| TEST_CASE | +( | +"Enable/Disable Calibrated Gyro" | , | +
| + | + | "" | [SingleReportEnableDisable] ) | +

| TEST_CASE | +( | +"Enable/Disable Game Rotation Vector" | , | +
| + | + | "" | [SingleReportEnableDisable] ) | +

| TEST_CASE | +( | +"Enable/Disable Gravity" | , | +
| + | + | "" | [SingleReportEnableDisable] ) | +

| TEST_CASE | +( | +"Enable/Disable Gyro Integrated Rotation Vector" | , | +
| + | + | "" | [SingleReportEnableDisable] ) | +

| TEST_CASE | +( | +"Enable/Disable Linear Accelerometer" | , | +
| + | + | "" | [SingleReportEnableDisable] ) | +

| TEST_CASE | +( | +"Enable/Disable Magnetometer" | , | +
| + | + | "" | [SingleReportEnableDisable] ) | +

| TEST_CASE | +( | +"Enable/Disable Rotation Vector" | , | +
| + | + | "" | [SingleReportEnableDisable] ) | +

| TEST_CASE | +( | +"Enable/Disable Stability Classifier" | , | +
| + | + | "" | [SingleReportEnableDisable] ) | +

| TEST_CASE | +( | +"Enable/Disable Step Counter" | , | +
| + | + | "" | [SingleReportEnableDisable] ) | +

| TEST_CASE | +( | +"Enable/Disable Uncalibrated Gyro" | , | +
| + | + | "" | [SingleReportEnableDisable] ) | +

+
|
+ +staticconstexpr | +
+
|
+ +staticconstexpr | +
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
| ▼CBNO08x | BNO08x IMU driver class |
| Cbno08x_init_status_t | Holds info about which functionality has been successfully initialized (used by deconstructor during cleanup) |
| Cbno08x_report_period_tracker_t | |
| Cbno08x_rx_packet_t | Holds data that is received over spi |
| Cbno08x_tx_packet_t | Holds data that is sent over spi |
| Cbno08x_config_t | IMU configuration settings passed into constructor |
| ▼CBNO08xTestHelper | BNO08x unit test helper class |
| Cimu_report_data_t | IMU configuration settings passed into constructor |
| CBNO08xTestSuite | BNO08x unit test launch point class |
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
This is the complete list of members for BNO08x, including all inherited members.
+|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
BNO08x IMU driver class. + More...
+ +#include <BNO08x.hpp>

+Classes | |
| struct | bno08x_init_status_t |
| Holds info about which functionality has been successfully initialized (used by deconstructor during cleanup). More... | |
| struct | bno08x_report_period_tracker_t |
| struct | bno08x_rx_packet_t |
| Holds data that is received over spi. More... | |
| struct | bno08x_tx_packet_t |
| Holds data that is sent over spi. More... | |
+Public Member Functions | |
| BNO08x (bno08x_config_t imu_config=bno08x_config_t()) | |
| BNO08x imu constructor. | |
| ~BNO08x () | |
| BNO08x imu deconstructor. | |
| bool | initialize () |
| Initializes BNO08x sensor. | |
| bool | hard_reset () |
| Hard resets BNO08x sensor. | |
| bool | soft_reset () |
| Soft resets BNO08x sensor using executable channel. | |
| BNO08xResetReason | get_reset_reason () |
| Requests product ID, prints the returned info over serial, and returns the reason for the most resent reset. | |
| bool | mode_sleep () |
| Puts BNO08x sensor into sleep/low power mode using executable channel. | |
| bool | mode_on () |
| Turns on/ brings BNO08x sensor out of sleep mode using executable channel. | |
| float | q_to_float (int16_t fixed_point_value, uint8_t q_point) |
| Converts a register value to a float using its associated Q point. (See https://en.wikipedia.org/wiki/Q_(number_format)) | |
| bool | run_full_calibration_routine () |
| Runs full calibration routine. | |
| void | calibrate_all () |
| Sends command to calibrate accelerometer, gyro, and magnetometer. | |
| void | calibrate_accelerometer () |
| Sends command to calibrate accelerometer. | |
| void | calibrate_gyro () |
| Sends command to calibrate gyro. | |
| void | calibrate_magnetometer () |
| Sends command to calibrate magnetometer. | |
| void | calibrate_planar_accelerometer () |
| Sends command to calibrate planar accelerometer. | |
| void | request_calibration_status () |
| Requests ME calibration status from BNO08x (see Ref. Manual 6.4.7.2) | |
| bool | calibration_complete () |
| Returns true if calibration has completed. | |
| void | end_calibration () |
| Sends command to end calibration procedure. | |
| void | save_calibration () |
| Sends command to save internal calibration data (See Ref. Manual 6.4.7). | |
| void | enable_rotation_vector (uint32_t time_between_reports) |
| Sends command to enable rotation vector reports (See Ref. Manual 6.5.18) | |
| void | enable_game_rotation_vector (uint32_t time_between_reports) |
| Sends command to enable game rotation vector reports (See Ref. Manual 6.5.19) | |
| void | enable_ARVR_stabilized_rotation_vector (uint32_t time_between_reports) |
| Sends command to enable ARVR stabilized rotation vector reports (See Ref. Manual 6.5.42) | |
| void | enable_ARVR_stabilized_game_rotation_vector (uint32_t time_between_reports) |
| Sends command to enable ARVR stabilized game rotation vector reports (See Ref. Manual 6.5.43) | |
| void | enable_gyro_integrated_rotation_vector (uint32_t time_between_reports) |
| Sends command to enable gyro integrated rotation vector reports (See Ref. Manual 6.5.44) | |
| void | enable_uncalibrated_gyro (uint32_t time_between_reports) |
| Sends command to enable uncalibrated gyro reports (See Ref. Manual 6.5.14) | |
| void | enable_calibrated_gyro (uint32_t time_between_reports) |
| Sends command to enable calibrated gyro reports (See Ref. Manual 6.5.13) | |
| void | enable_accelerometer (uint32_t time_between_reports) |
| Sends command to enable accelerometer reports (See Ref. Manual 6.5.9) | |
| void | enable_linear_accelerometer (uint32_t time_between_reports) |
| Sends command to enable linear accelerometer reports (See Ref. Manual 6.5.10) | |
| void | enable_gravity (uint32_t time_between_reports) |
| Sends command to enable gravity reading reports (See Ref. Manual 6.5.11) | |
| void | enable_magnetometer (uint32_t time_between_reports) |
| Sends command to enable magnetometer reports (See Ref. Manual 6.5.16) | |
| void | enable_tap_detector (uint32_t time_between_reports) |
| Sends command to enable tap detector reports (See Ref. Manual 6.5.27) | |
| void | enable_step_counter (uint32_t time_between_reports) |
| Sends command to enable step counter reports (See Ref. Manual 6.5.29) | |
| void | enable_stability_classifier (uint32_t time_between_reports) |
| Sends command to enable activity stability classifier reports (See Ref. Manual 6.5.31) | |
| void | enable_activity_classifier (uint32_t time_between_reports, BNO08xActivityEnable activities_to_enable, uint8_t(&activity_confidence_vals)[9]) |
| Sends command to enable activity classifier reports (See Ref. Manual 6.5.36) | |
| void | enable_raw_mems_gyro (uint32_t time_between_reports) |
| Sends command to enable raw MEMs gyro reports (See Ref. Manual 6.5.12) | |
| void | enable_raw_mems_accelerometer (uint32_t time_between_reports) |
| Sends command to enable raw MEMs accelerometer reports (See Ref. Manual 6.5.8) | |
| void | enable_raw_mems_magnetometer (uint32_t time_between_reports) |
| Sends command to enable raw MEMs magnetometer reports (See Ref. Manual 6.5.15) | |
| void | disable_rotation_vector () |
| Sends command to disable rotation vector reports by setting report interval to 0. | |
| void | disable_game_rotation_vector () |
| Sends command to disable game rotation vector reports by setting report interval to 0. | |
| void | disable_ARVR_stabilized_rotation_vector () |
| Sends command to disable ARVR stabilized rotation vector reports by setting report interval to 0. | |
| void | disable_ARVR_stabilized_game_rotation_vector () |
| Sends command to disable ARVR stabilized game rotation vector reports by setting report interval to 0. | |
| void | disable_gyro_integrated_rotation_vector () |
| Sends command to disable gyro integrated rotation vector reports by setting report interval to 0. | |
| void | disable_accelerometer () |
| Sends command to disable accelerometer reports by setting report interval to 0. | |
| void | disable_linear_accelerometer () |
| Sends command to disable linear accelerometer reports by setting report interval to 0. | |
| void | disable_gravity () |
| Sends command to disable gravity reports by setting report interval to 0. | |
| void | disable_calibrated_gyro () |
| Sends command to disable calibrated gyro reports by setting report interval to 0. | |
| void | disable_uncalibrated_gyro () |
| Sends command to disable uncalibrated gyro reports by setting report interval to 0. | |
| void | disable_magnetometer () |
| Sends command to disable magnetometer reports by setting report interval to 0. | |
| void | disable_step_counter () |
| Sends command to disable step counter reports by setting report interval to 0. | |
| void | disable_stability_classifier () |
| Sends command to disable stability reports by setting report interval to 0. | |
| void | disable_activity_classifier () |
| Sends command to disable activity classifier reports by setting report interval to 0. | |
| void | disable_tap_detector () |
| Sends command to disable tap detector reports by setting report interval to 0. | |
| void | disable_raw_mems_accelerometer () |
| Sends command to disable raw accelerometer reports by setting report interval to 0. | |
| void | disable_raw_mems_gyro () |
| Sends command to disable raw gyro reports by setting report interval to 0. | |
| void | disable_raw_mems_magnetometer () |
| Sends command to disable raw magnetometer reports by setting report interval to 0. | |
| void | tare_now (uint8_t axis_sel=TARE_AXIS_ALL, uint8_t rotation_vector_basis=TARE_ROTATION_VECTOR) |
| Sends command to tare an axis (See Ref. Manual 6.4.4.1) | |
| void | save_tare () |
| Sends command to save tare into non-volatile memory of BNO08x (See Ref. Manual 6.4.4.2) | |
| void | clear_tare () |
| Sends command to clear persistent tare settings in non-volatile memory of BNO08x (See Ref. Manual 6.4.4.3) | |
| bool | data_available (bool ignore_no_reports_enabled=false) |
| Checks if BNO08x has asserted interrupt and sent data. | |
| void | register_cb (std::function< void()> cb_fxn) |
| Registers a callback to execute when new data from a report is received. | |
| void | reset_all_data_to_defaults () |
| Resets all data returned by public getter APIs to initial values of 0 and low accuracy. | |
| uint32_t | get_time_stamp () |
| Return timestamp of most recent report. | |
| void | get_magf (float &x, float &y, float &z, BNO08xAccuracy &accuracy) |
| Get the full magnetic field vector. | |
| float | get_magf_X () |
| Get X component of magnetic field vector. | |
| float | get_magf_Y () |
| Get Y component of magnetic field vector. | |
| float | get_magf_Z () |
| Get Z component of magnetic field vector. | |
| BNO08xAccuracy | get_magf_accuracy () |
| Get accuracy of reported magnetic field vector. | |
| void | get_gravity (float &x, float &y, float &z, BNO08xAccuracy &accuracy) |
| Get full reported gravity vector, units in m/s^2. | |
| float | get_gravity_X () |
| Get the reported x axis gravity. | |
| float | get_gravity_Y () |
| Get the reported y axis gravity. | |
| float | get_gravity_Z () |
| Get the reported z axis gravity. | |
| BNO08xAccuracy | get_gravity_accuracy () |
| Get the reported gravity accuracy. | |
| float | get_roll () |
| Get the reported rotation about x axis. | |
| float | get_pitch () |
| Get the reported rotation about y axis. | |
| float | get_yaw () |
| Get the reported rotation about z axis. | |
| float | get_roll_deg () |
| Get the reported rotation about x axis. | |
| float | get_pitch_deg () |
| Get the reported rotation about y axis. | |
| float | get_yaw_deg () |
| Get the reported rotation about z axis. | |
| void | get_quat (float &i, float &j, float &k, float &real, float &rad_accuracy, BNO08xAccuracy &accuracy) |
| Get the full quaternion reading. | |
| float | get_quat_I () |
| Get I component of reported quaternion. | |
| float | get_quat_J () |
| Get J component of reported quaternion. | |
| float | get_quat_K () |
| Get K component of reported quaternion. | |
| float | get_quat_real () |
| Get real component of reported quaternion. | |
| float | get_quat_radian_accuracy () |
| Get radian accuracy of reported quaternion. | |
| BNO08xAccuracy | get_quat_accuracy () |
| Get accuracy of reported quaternion. | |
| void | get_accel (float &x, float &y, float &z, BNO08xAccuracy &accuracy) |
| Get full acceleration (total acceleration of device, units in m/s^2). | |
| float | get_accel_X () |
| Get x axis acceleration (total acceleration of device, units in m/s^2). | |
| float | get_accel_Y () |
| Get y axis acceleration (total acceleration of device, units in m/s^2). | |
| float | get_accel_Z () |
| Get z axis acceleration (total acceleration of device, units in m/s^2). | |
| BNO08xAccuracy | get_accel_accuracy () |
| Get accuracy of linear acceleration. | |
| void | get_linear_accel (float &x, float &y, float &z, BNO08xAccuracy &accuracy) |
| Get full linear acceleration (acceleration of the device minus gravity, units in m/s^2). | |
| float | get_linear_accel_X () |
| Get x axis linear acceleration (acceleration of device minus gravity, units in m/s^2) | |
| float | get_linear_accel_Y () |
| Get y axis linear acceleration (acceleration of device minus gravity, units in m/s^2) | |
| float | get_linear_accel_Z () |
| Get z axis linear acceleration (acceleration of device minus gravity, units in m/s^2) | |
| BNO08xAccuracy | get_linear_accel_accuracy () |
| Get accuracy of linear acceleration. | |
| void | get_raw_mems_accel (uint16_t &x, uint16_t &y, uint16_t &z) |
| Get full raw acceleration from physical accelerometer MEMs sensor (See Ref. Manual 6.5.8). | |
| uint16_t | get_raw_mems_accel_X () |
| Get raw accelerometer x axis reading from physical accelerometer MEMs sensor (See Ref. Manual 6.5.8) | |
| uint16_t | get_raw_mems_accel_Y () |
| Get raw accelerometer y axis reading from physical accelerometer MEMs sensor (See Ref. Manual 6.5.8) | |
| uint16_t | get_raw_mems_accel_Z () |
| Get raw accelerometer z axis reading from physical accelerometer MEMs sensor (See Ref. Manual 6.5.8) | |
| void | get_raw_mems_gyro (uint16_t &x, uint16_t &y, uint16_t &z) |
| Get raw gyroscope full reading from physical gyroscope MEMs sensor (See Ref. Manual 6.5.12) | |
| uint16_t | get_raw_mems_gyro_X () |
| Get raw gyroscope x axis reading from physical gyroscope MEMs sensor (See Ref. Manual 6.5.12) | |
| uint16_t | get_raw_mems_gyro_Y () |
| Get raw gyroscope y axis reading from physical gyroscope MEMs sensor (See Ref. Manual 6.5.12) | |
| uint16_t | get_raw_mems_gyro_Z () |
| Get raw gyroscope z axis reading from physical gyroscope MEMs sensor (See Ref. Manual 6.5.12) | |
| void | get_raw_mems_magf (uint16_t &x, uint16_t &y, uint16_t &z) |
| Get raw magnetometer full reading from physical magnetometer sensor (See Ref. Manual 6.5.15) | |
| uint16_t | get_raw_mems_magf_X () |
| Get raw magnetometer x axis reading from physical magnetometer sensor (See Ref. Manual 6.5.15) | |
| uint16_t | get_raw_mems_magf_Y () |
| Get raw magnetometer y axis reading from physical magnetometer sensor (See Ref. Manual 6.5.15) | |
| uint16_t | get_raw_mems_magf_Z () |
| Get raw magnetometer z axis reading from physical magnetometer sensor (See Ref. Manual 6.5.15) | |
| void | get_calibrated_gyro_velocity (float &x, float &y, float &z) |
| Get full rotational velocity with drift compensation (units in Rad/s). | |
| float | get_calibrated_gyro_velocity_X () |
| Get calibrated gyro x axis angular velocity measurement. | |
| float | get_calibrated_gyro_velocity_Y () |
| Get calibrated gyro y axis angular velocity measurement. | |
| float | get_calibrated_gyro_velocity_Z () |
| Get calibrated gyro z axis angular velocity measurement. | |
| void | get_uncalibrated_gyro_velocity (float &x, float &y, float &z, float &bx, float &by, float &bz) |
| Get full rotational velocity without drift compensation (units in Rad/s). An estimate of drift is given but not applied. | |
| float | get_uncalibrated_gyro_velocity_X () |
| Get uncalibrated gyro x axis angular velocity measurement. | |
| float | get_uncalibrated_gyro_velocity_Y () |
| Get uncalibrated gyro Y axis angular velocity measurement. | |
| float | get_uncalibrated_gyro_velocity_Z () |
| Get uncalibrated gyro Z axis angular velocity measurement. | |
| float | get_uncalibrated_gyro_bias_X () |
| Get uncalibrated gyro x axis drift estimate. | |
| float | get_uncalibrated_gyro_bias_Y () |
| Get uncalibrated gyro Y axis drift estimate. | |
| float | get_uncalibrated_gyro_bias_Z () |
| Get uncalibrated gyro Z axis drift estimate. | |
| void | get_integrated_gyro_velocity (float &x, float &y, float &z) |
| Full rotational velocity from gyro-integrated rotation vector (See Ref. Manual 6.5.44) | |
| float | get_integrated_gyro_velocity_X () |
| Get x axis angular velocity from gyro-integrated rotation vector. (See Ref. Manual 6.5.44) | |
| float | get_integrated_gyro_velocity_Y () |
| Get y axis angular velocity from gyro-integrated rotation vector. (See Ref. Manual 6.5.44) | |
| float | get_integrated_gyro_velocity_Z () |
| Get z axis angular velocity from gyro-integrated rotation vector. (See Ref. Manual 6.5.44) | |
| uint8_t | get_tap_detector () |
| Get if tap has occured. | |
| uint16_t | get_step_count () |
| Get the counted amount of steps. | |
| BNO08xStability | get_stability_classifier () |
| Get the current stability classifier (Seee Ref. Manual 6.5.31) | |
| BNO08xActivity | get_activity_classifier () |
| Get the current activity classifier (Seee Ref. Manual 6.5.36) | |
| int16_t | get_Q1 (uint16_t record_ID) |
| Gets Q1 point from BNO08x FRS (flash record system). | |
| int16_t | get_Q2 (uint16_t record_ID) |
| Gets Q2 point from BNO08x FRS (flash record system). | |
| int16_t | get_Q3 (uint16_t record_ID) |
| Gets Q3 point from BNO08x FRS (flash record system). | |
| float | get_resolution (uint16_t record_ID) |
| Gets resolution from BNO08x FRS (flash record system). | |
| float | get_range (uint16_t record_ID) |
| Gets range from BNO08x FRS (flash record system). | |
| uint32_t | FRS_read_word (uint16_t record_ID, uint8_t word_number) |
| Reads meta data word from BNO08x FRS (flash record system) given the record ID and word number. (See Ref. Manual 5.1 & 6.3.7) | |
| bool | FRS_read_request (uint16_t record_ID, uint16_t read_offset, uint16_t block_size) |
| Requests meta data from BNO08x FRS (flash record system) given the record ID. Contains Q points and other info. (See Ref. Manual 5.1 & 6.3.6) | |
| bool | FRS_read_data (uint16_t record_ID, uint8_t start_location, uint8_t words_to_read) |
| Read meta data from BNO08x FRS (flash record system) given the record ID. Contains Q points and other info. (See Ref. Manual 5.1 & 6.3.7) | |
+Static Public Attributes | |
| static const constexpr uint16_t | FRS_RECORD_ID_ACCELEROMETER |
| Accelerometer record ID, to be passed in metadata functions like get_Q1() | |
| static const constexpr uint16_t | FRS_RECORD_ID_GYROSCOPE_CALIBRATED |
| Calirated gyroscope record ID, to be passed in metadata functions like get_Q1() | |
| static const constexpr uint16_t | FRS_RECORD_ID_MAGNETIC_FIELD_CALIBRATED |
| Calibrated magnetometer record ID, to be passed in metadata functions like get_Q1() | |
| static const constexpr uint16_t | FRS_RECORD_ID_ROTATION_VECTOR |
| Rotation vector record ID, to be passed in metadata functions like get_Q1() | |
| static const constexpr uint8_t | TARE_AXIS_ALL = 0x07U |
| Tare all axes (used with tare now command) | |
| static const constexpr uint8_t | TARE_AXIS_Z = 0x04U |
| Tar yaw axis only (used with tare now command) | |
| static const constexpr uint8_t | TARE_ROTATION_VECTOR = 0U |
| Tare rotation vector. | |
| static const constexpr uint8_t | TARE_GAME_ROTATION_VECTOR = 1U |
| Tare game rotation vector. | |
| static const constexpr uint8_t | TARE_GEOMAGNETIC_ROTATION_VECTOR = 2U |
| tare geomagnetic rotation vector | |
| static const constexpr uint8_t | TARE_GYRO_INTEGRATED_ROTATION_VECTOR = 3U |
| Tare gyro integrated rotation vector. | |
| static const constexpr uint8_t | TARE_ARVR_STABILIZED_ROTATION_VECTOR = 4U |
| Tare ARVR stabilized rotation vector. | |
| static const constexpr uint8_t | TARE_ARVR_STABILIZED_GAME_ROTATION_VECTOR = 5U |
| Tare ARVR stabilized game rotation vector. | |
| static const constexpr int16_t | ROTATION_VECTOR_Q1 = 14 |
| Rotation vector Q point (See SH-2 Ref. Manual 6.5.18) | |
| static const constexpr int16_t | ROTATION_VECTOR_ACCURACY_Q1 = 12 |
| Rotation vector accuracy estimate Q point (See SH-2 Ref. Manual 6.5.18) | |
| static const constexpr int16_t | ACCELEROMETER_Q1 = 8 |
| Acceleration Q point (See SH-2 Ref. Manual 6.5.9) | |
| static const constexpr int16_t | LINEAR_ACCELEROMETER_Q1 = 8 |
| Linear acceleration Q point (See SH-2 Ref. Manual 6.5.10) | |
| static const constexpr int16_t | GYRO_Q1 = 9 |
| Gyro Q point (See SH-2 Ref. Manual 6.5.13) | |
| static const constexpr int16_t | MAGNETOMETER_Q1 = 4 |
| Magnetometer Q point (See SH-2 Ref. Manual 6.5.16) | |
| static const constexpr int16_t | ANGULAR_VELOCITY_Q1 = 10 |
| Angular velocity Q point (See SH-2 Ref. Manual 6.5.44) | |
| static const constexpr int16_t | GRAVITY_Q1 = 8 |
| Gravity Q point (See SH-2 Ref. Manual 6.5.11) | |
+Private Types | |
| enum | channels_t { + CHANNEL_COMMAND +, CHANNEL_EXECUTABLE +, CHANNEL_CONTROL +, CHANNEL_REPORTS +, + CHANNEL_WAKE_REPORTS +, CHANNEL_GYRO + + } |
| SHTP protocol channels. More... | |
| typedef struct BNO08x::bno08x_rx_packet_t | bno08x_rx_packet_t |
| Holds data that is received over spi. | |
| typedef struct BNO08x::bno08x_tx_packet_t | bno08x_tx_packet_t |
| Holds data that is sent over spi. | |
| typedef struct BNO08x::bno08x_report_period_tracker_t | bno08x_report_period_tracker_t |
| typedef struct BNO08x::bno08x_init_status_t | bno08x_init_status_t |
| Holds info about which functionality has been successfully initialized (used by deconstructor during cleanup). | |
+Private Member Functions | |
| esp_err_t | init_config_args () |
| Initializes required esp-idf SPI data structures with values from user passed bno08x_config_t struct. | |
| esp_err_t | init_gpio () |
| Initializes required gpio. | |
| esp_err_t | init_gpio_inputs () |
| Initializes required gpio inputs. | |
| esp_err_t | init_gpio_outputs () |
| Initializes required gpio outputs. | |
| esp_err_t | init_hint_isr () |
| Initializes host interrupt ISR. | |
| esp_err_t | init_spi () |
| Initializes SPI. | |
| esp_err_t | deinit_gpio () |
| Deinitializes GPIO, called from deconstructor. | |
| esp_err_t | deinit_gpio_inputs () |
| Deinitializes GPIO inputs, called from deconstructor. | |
| esp_err_t | deinit_gpio_outputs () |
| Deinitializes GPIO outputs, called from deconstructor. | |
| esp_err_t | deinit_hint_isr () |
| Deinitializes host interrupt ISR, called from deconstructor. | |
| esp_err_t | deinit_spi () |
| Deinitializes SPI. | |
| bool | wait_for_rx_done () |
| Waits for data to be received over SPI, or host_int_timeout_ms to elapse. | |
| bool | wait_for_tx_done () |
| Waits for a queued packet to be sent or host_int_timeout_ms to elapse. | |
| bool | wait_for_data () |
| Waits for a valid or invalid packet to be received or host_int_timeout_ms to elapse. | |
| esp_err_t | receive_packet () |
| Receives a SHTP packet via SPI and sends it to data_proc_task() | |
| esp_err_t | receive_packet_header (bno08x_rx_packet_t *packet) |
| Receives a SHTP packet header via SPI. | |
| esp_err_t | receive_packet_body (bno08x_rx_packet_t *packet) |
| Receives a SHTP packet body via SPI. | |
| void | send_packet (bno08x_tx_packet_t *packet) |
| Sends a queued SHTP packet via SPI. | |
| void | flush_rx_packets (uint8_t flush_count) |
| void | enable_report (uint8_t report_ID, uint32_t time_between_reports, const EventBits_t report_evt_grp_bit, uint32_t special_config=0) |
| Enables a sensor report for a given ID. | |
| void | disable_report (uint8_t report_ID, const EventBits_t report_evt_grp_bit) |
| Disables a sensor report for a given ID by setting its time interval to 0. | |
| void | queue_packet (uint8_t channel_number, uint8_t data_length, uint8_t *commands) |
| Queues an SHTP packet to be sent via SPI. | |
| void | queue_command (uint8_t command, uint8_t *commands) |
| Queues a packet containing a command. | |
| void | queue_feature_command (uint8_t report_ID, uint32_t time_between_reports, uint32_t specific_config=0) |
| Queues a packet containing a command with a request for sensor reports, reported periodically. (See Ref. Manual 6.5.4) | |
| void | queue_calibrate_command (uint8_t _to_calibrate) |
| Queues a packet containing a command to calibrate the specified sensor. | |
| void | queue_tare_command (uint8_t command, uint8_t axis=TARE_AXIS_ALL, uint8_t rotation_vector_basis=TARE_ROTATION_VECTOR) |
| Queues a packet containing a command related to zeroing sensor's axes. (See Ref. Manual 6.4.4.1) | |
| void | queue_request_product_id_command () |
| Queues a packet containing the request product ID command. | |
| uint16_t | parse_packet (bno08x_rx_packet_t *packet, bool ¬ify_users) |
| Parses a packet received from bno08x, updating any data according to received reports. | |
| uint16_t | parse_product_id_report (bno08x_rx_packet_t *packet) |
| Parses product id report and prints device info. | |
| uint16_t | parse_frs_read_response_report (bno08x_rx_packet_t *packet) |
| Sends packet to be parsed to meta data function call (FRS_read_data()) through queue. | |
| uint16_t | parse_feature_get_response_report (bno08x_rx_packet_t *packet) |
| Parses get feature request report received from BNO08x. | |
| uint16_t | parse_input_report (bno08x_rx_packet_t *packet) |
| Parses received input report sent by BNO08x. | |
| void | parse_input_report_data (bno08x_rx_packet_t *packet, uint16_t *data, uint16_t data_length) |
| Parses data from received input report. | |
| uint16_t | parse_gyro_integrated_rotation_vector_report (bno08x_rx_packet_t *packet) |
| Parses received gyro integrated rotation vector report sent by BNO08x. | |
| uint16_t | parse_command_report (bno08x_rx_packet_t *packet) |
| Parses received command report sent by BNO08x (See Ref. Manual 6.3.9) | |
| void | update_accelerometer_data (uint16_t *data, uint8_t status) |
| Updates accelerometer data from parsed input report. | |
| void | update_lin_accelerometer_data (uint16_t *data, uint8_t status) |
| Updates linear accelerometer data from parsed input report. | |
| void | update_calibrated_gyro_data (uint16_t *data, uint8_t status) |
| Updates linear gyro data from parsed input report. | |
| void | update_uncalibrated_gyro_data (uint16_t *data, uint8_t status) |
| Updates uncalibrated gyro data from parsed input report. | |
| void | update_magf_data (uint16_t *data, uint8_t status) |
| Updates magnetic field data from parsed input report. | |
| void | update_gravity_data (uint16_t *data, uint8_t status) |
| Updates gravity data from parsed input report. | |
| void | update_rotation_vector_data (uint16_t *data, uint8_t status) |
| Updates roation vector data from parsed input report. | |
| void | update_step_counter_data (uint16_t *data) |
| Updates step counter data from parsed input report. | |
| void | update_raw_accelerometer_data (uint16_t *data) |
| Updates raw accelerometer data from parsed input report. | |
| void | update_raw_gyro_data (uint16_t *data) |
| Updates raw gyro data from parsed input report. | |
| void | update_raw_magf_data (uint16_t *data) |
| Updates raw magnetic field data from parsed input report. | |
| void | update_tap_detector_data (bno08x_rx_packet_t *packet) |
| Updates tap detector data from parsed input report. | |
| void | update_stability_classifier_data (bno08x_rx_packet_t *packet) |
| Updates stability classifier data from parsed input report. | |
| void | update_personal_activity_classifier_data (bno08x_rx_packet_t *packet) |
| Updates activity classifier data from parsed input report. | |
| void | update_command_data (bno08x_rx_packet_t *packet) |
| Updates command data from parsed input report. | |
| void | update_integrated_gyro_rotation_vector_data (bno08x_rx_packet_t *packet) |
| Updates integrated gyro rotation vector data from SHTP channel 5 (CHANNEL_GYRO) special report data. | |
| void | print_header (bno08x_rx_packet_t *packet) |
| Prints the header of the passed SHTP packet to serial console with ESP_LOG statement. | |
| void | print_packet (bno08x_rx_packet_t *packet) |
| Prints the passed SHTP packet to serial console with ESP_LOG statement. | |
| void | spi_task () |
| Task responsible for SPI transactions. Executed when HINT in is asserted by BNO08x. | |
| void | data_proc_task () |
| Task responsible parsing packets. Executed when SPI task sends a packet to be parsed, notifies wait_for_data() call. | |
| esp_err_t | launch_tasks () |
| Launches spi_task and data_proc_task on constructor call. | |
| esp_err_t | kill_all_tasks () |
| Deletes spi_task and data_proc_task safely on deconstructor call. | |
| void | update_report_period_trackers (uint8_t report_ID, uint32_t new_period) |
| Updates period of respective report in report_period_trackers and recalculates host_int_timeout_ms according to next longest report period. | |
+Static Private Member Functions | |
| static void | spi_task_trampoline (void *arg) |
| Static function used to launch spi task. | |
| static void | data_proc_task_trampoline (void *arg) |
| Static function used to launch data processing task. | |
| static uint8_t | report_ID_to_report_period_tracker_idx (uint8_t report_ID) |
| Converts report id to respective index in report_period_trackers. | |
| static void IRAM_ATTR | hint_handler (void *arg) |
| HINT interrupt service routine, handles falling edge of BNO08x HINT pin. | |
+Private Attributes | |
| bool | first_boot = true |
| true only for first execution of hard_reset(), used to suppress the printing of product ID report. | |
| TaskHandle_t | spi_task_hdl |
| spi_task() handle | |
| TaskHandle_t | data_proc_task_hdl |
| data_proc_task() task handle | |
| SemaphoreHandle_t | sem_kill_tasks |
| semaphore to count amount of killed tasks | |
| EventGroupHandle_t | evt_grp_spi |
| Event group for indicating when bno08x hint pin has triggered and when new data has been processed. Used by calls to sending or receiving functions. | |
| EventGroupHandle_t | evt_grp_report_en |
| Event group for indicating which reports are currently enabled. | |
| EventGroupHandle_t | evt_grp_task_flow |
| Event group for indicating when tasks should complete and self-delete (on deconstructor call) | |
| QueueHandle_t | queue_rx_data |
| Packet queue used to send data received from bno08x from spi_task to data_proc_task. | |
| QueueHandle_t | queue_tx_data |
| Packet queue used to send data to be sent over SPI from sending functions to spi_task. | |
| QueueHandle_t | queue_frs_read_data |
| Queue used to send packet body from data_proc_task to frs read functions. | |
| QueueHandle_t | queue_reset_reason |
| Queue used to send reset reason from product id report to reset_reason() function. | |
| std::vector< std::function< void()> > | cb_list |
| uint32_t | meta_data [9] |
| First 9 bytes of meta data returned from FRS read operation (we don't really need the rest) (See Ref. Manual 5.1) | |
| bno08x_config_t | imu_config {} |
| IMU configuration settings. | |
| spi_bus_config_t | bus_config {} |
| SPI bus GPIO configuration settings. | |
| spi_device_interface_config_t | imu_spi_config {} |
| SPI slave device settings. | |
| spi_device_handle_t | spi_hdl {} |
| SPI device handle. | |
| spi_transaction_t | spi_transaction {} |
| SPI transaction handle. | |
| bno08x_init_status_t | init_status |
| Initialization status of various functionality, used by deconstructor during cleanup, set during initialization. | |
| uint32_t | time_stamp |
| Report timestamp (see datasheet 1.3.5.3) | |
| uint16_t | raw_accel_X |
| uint16_t | raw_accel_Y |
| uint16_t | raw_accel_Z |
| uint16_t | accel_accuracy |
| Raw acceleration readings (See SH-2 Ref. Manual 6.5.8) | |
| uint16_t | raw_lin_accel_X |
| uint16_t | raw_lin_accel_Y |
| uint16_t | raw_lin_accel_Z |
| uint16_t | accel_lin_accuracy |
| Raw linear acceleration (See SH-2 Ref. Manual 6.5.10) | |
| uint16_t | raw_calib_gyro_X |
| uint16_t | raw_calib_gyro_Y |
| uint16_t | raw_calib_gyro_Z |
| Raw gyro reading (See SH-2 Ref. Manual 6.5.13) | |
| uint16_t | raw_quat_I |
| uint16_t | raw_quat_J |
| uint16_t | raw_quat_K |
| uint16_t | raw_quat_real |
| uint16_t | raw_quat_radian_accuracy |
| uint16_t | quat_accuracy |
| Raw quaternion reading (See SH-2 Ref. Manual 6.5.44) | |
| uint16_t | integrated_gyro_velocity_X |
| uint16_t | integrated_gyro_velocity_Y |
| uint16_t | integrated_gyro_velocity_Z |
| Raw gyro angular velocity reading from integrated gyro rotation vector (See SH-2 Ref. Manual 6.5.44) | |
| uint16_t | gravity_X |
| uint16_t | gravity_Y |
| uint16_t | gravity_Z |
| uint16_t | gravity_accuracy |
| Gravity reading in m/s^2 (See SH-2 Ref. Manual 6.5.11) | |
| uint16_t | raw_uncalib_gyro_X |
| uint16_t | raw_uncalib_gyro_Y |
| uint16_t | raw_uncalib_gyro_Z |
| uint16_t | raw_bias_X |
| uint16_t | raw_bias_Y |
| uint16_t | raw_bias_Z |
| Uncalibrated gyro reading (See SH-2 Ref. Manual 6.5.14) | |
| uint16_t | raw_magf_X |
| uint16_t | raw_magf_Y |
| uint16_t | raw_magf_Z |
| uint16_t | magf_accuracy |
| Calibrated magnetic field reading in uTesla (See SH-2 Ref. Manual 6.5.16) | |
| uint8_t | tap_detector |
| Tap detector reading (See SH-2 Ref. Manual 6.5.27) | |
| uint16_t | step_count |
| Step counter reading (See SH-2 Ref. Manual 6.5.29) | |
| uint8_t | stability_classifier |
| BNO08xStability status reading (See SH-2 Ref. Manual 6.5.31) | |
| uint8_t | activity_classifier |
| BNO08xActivity status reading (See SH-2 Ref. Manual 6.5.36) | |
| uint8_t * | activity_confidences = nullptr |
| Confidence of read activities (See SH-2 Ref. Manual 6.5.36) | |
| uint8_t | calibration_status |
| Calibration status of device (See SH-2 Ref. Manual 6.4.7.1 & 6.4.7.2) | |
| uint16_t | mems_raw_accel_X |
| uint16_t | mems_raw_accel_Y |
| uint16_t | mems_raw_accel_Z |
| Raw accelerometer readings from MEMS sensor (See SH2 Ref. Manual 6.5.8) | |
| uint16_t | mems_raw_gyro_X |
| uint16_t | mems_raw_gyro_Y |
| uint16_t | mems_raw_gyro_Z |
| Raw gyro readings from MEMS sensor (See SH-2 Ref. Manual 6.5.12) | |
| uint16_t | mems_raw_magf_X |
| uint16_t | mems_raw_magf_Y |
| uint16_t | mems_raw_magf_Z |
| Raw magnetometer (compass) readings from MEMS sensor (See SH-2 Ref. Manual 6.5.15) | |
| bno08x_report_period_tracker_t | report_period_trackers [REPORT_CNT] |
| Current sample period of each report in microseconds linked to report ID (0 if not enabled). | |
| uint32_t | largest_sample_period_us |
| Current largest sample period of any enabled report in microseconds (used to determine timeout for hint ISR). | |
| uint8_t | current_slowest_report_ID |
| ID of the currently enabled report with the largest sample period. | |
| TickType_t | host_int_timeout_ms |
| Max wait between HINT being asserted by BNO08x before transaction is considered failed (in miliseconds), determined by enabled report with longest period. | |
+Static Private Attributes | |
| static const constexpr uint8_t | TASK_CNT = 2U |
| Total amount of tasks utilized by BNO08x driver library. | |
| static const constexpr uint16_t | RX_DATA_LENGTH = 300U |
| length buffer containing data received over spi | |
| static const constexpr uint16_t | MAX_METADATA_LENGTH = 9U |
| max length of metadata used in frs read operations | |
| static const constexpr TickType_t | HOST_INT_TIMEOUT_DEFAULT_MS |
| Max wait between HINT being asserted by BNO08x before transaction is considered failed (in miliseconds), when no reports are enabled (ie during reset) | |
| static const constexpr TickType_t | HARD_RESET_DELAY_MS |
| How long RST pin is held low during hard reset (min 10ns according to datasheet, but should be longer for stable operation) | |
| static const constexpr TickType_t | CMD_EXECUTION_DELAY_MS |
| How long to delay after queueing command to allow it to execute (for ex. after sending command to enable report). | |
| static const constexpr uint32_t | SCLK_MAX_SPEED = 3000000UL |
| Max SPI SCLK speed BNO08x is capable of. | |
| static const constexpr EventBits_t | EVT_GRP_SPI_RX_DONE_BIT |
| When this bit is set it indicates a receive procedure has completed. | |
| static const constexpr EventBits_t | EVT_GRP_SPI_RX_VALID_PACKET_BIT |
| When this bit is set, it indicates a valid packet has been received and processed. | |
| static const constexpr EventBits_t | EVT_GRP_SPI_RX_INVALID_PACKET_BIT |
| When this bit is set, it indicates an invalid packet has been received. | |
| static const constexpr EventBits_t | EVT_GRP_SPI_TX_DONE_BIT = (1 << 3) |
| When this bit is set, it indicates a queued packet has been sent. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_ROTATION_VECTOR_BIT = (1 << 0) |
| When set, rotation vector reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_GAME_ROTATION_VECTOR_BIT = (1 << 1) |
| When set, game rotation vector reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_ARVR_S_ROTATION_VECTOR_BIT |
| When set, ARVR stabilized rotation vector reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_ARVR_S_GAME_ROTATION_VECTOR_BIT |
| When set, ARVR stabilized game rotation vector reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_GYRO_ROTATION_VECTOR_BIT |
| When set, gyro integrator rotation vector reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_ACCELEROMETER_BIT = (1U << 5U) |
| When set, accelerometer reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_LINEAR_ACCELEROMETER_BIT = (1U << 6U) |
| When set, linear accelerometer reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_GRAVITY_BIT = (1U << 7U) |
| When set, gravity reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_GYRO_BIT = (1U << 8U) |
| When set, gyro reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_GYRO_UNCALIBRATED_BIT = (1U << 9U) |
| When set, uncalibrated gyro reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_MAGNETOMETER_BIT = (1U << 10U) |
| When set, magnetometer reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_TAP_DETECTOR_BIT = (1U << 11U) |
| When set, tap detector reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_STEP_COUNTER_BIT = (1U << 12U) |
| When set, step counter reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_STABILITY_CLASSIFIER_BIT = (1U << 13U) |
| When set, stability classifier reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_ACTIVITY_CLASSIFIER_BIT = (1U << 14U) |
| When set, activity classifier reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_RAW_ACCELEROMETER_BIT = (1U << 15U) |
| When set, raw accelerometer reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_RAW_GYRO_BIT = (1U << 16U) |
| When set, raw gyro reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_RAW_MAGNETOMETER_BIT = (1U << 17U) |
| When set, raw magnetometer reports are active. | |
| static const constexpr EventBits_t | EVT_GRP_TSK_FLW_RUNNING_BIT |
| When set, data_proc_task and spi_task are active, when 0 they are pending deletion or deleted. | |
| static const constexpr EventBits_t | EVT_GRP_RPT_ALL_BITS |
| static const constexpr uint8_t | CALIBRATE_ACCEL = 0U |
| Calibrate accelerometer command used by queue_calibrate_command. | |
| static const constexpr uint8_t | CALIBRATE_GYRO = 1U |
| Calibrate gyro command used by queue_calibrate_command. | |
| static const constexpr uint8_t | CALIBRATE_MAG = 2U |
| Calibrate magnetometer command used by queue_calibrate_command. | |
| static const constexpr uint8_t | CALIBRATE_PLANAR_ACCEL = 3U |
| Calibrate planar acceleration command used by queue_calibrate_command. | |
| static const constexpr uint8_t | CALIBRATE_ACCEL_GYRO_MAG |
| Calibrate accelerometer, gyro, & magnetometer command used by queue_calibrate_command. | |
| static const constexpr uint8_t | CALIBRATE_STOP = 5U |
| Stop calibration command used by queue_calibrate_command. | |
| static const constexpr uint8_t | COMMAND_ERRORS = 1U |
| static const constexpr uint8_t | COMMAND_COUNTER = 2U |
| static const constexpr uint8_t | COMMAND_TARE = 3U |
| Command and response to tare command (See Sh2 Ref. Manual 6.4.4) | |
| static const constexpr uint8_t | COMMAND_INITIALIZE = 4U |
| Reinitialize sensor hub components See (SH2 Ref. Manual 6.4.5) | |
| static const constexpr uint8_t | COMMAND_DCD = 6U |
| Save DCD command (See SH2 Ref. Manual 6.4.7) | |
| static const constexpr uint8_t | COMMAND_ME_CALIBRATE = 7U |
| Command and response to configure ME calibration (See SH2 Ref. Manual 6.4.7) | |
| static const constexpr uint8_t | COMMAND_DCD_PERIOD_SAVE = 9U |
| Configure DCD periodic saving (See SH2 Ref. Manual 6.4) | |
| static const constexpr uint8_t | COMMAND_OSCILLATOR = 10U |
| Retrieve oscillator type command (See SH2 Ref. Manual 6.4) | |
| static const constexpr uint8_t | COMMAND_CLEAR_DCD = 11U |
| Clear DCD & Reset command (See SH2 Ref. Manual 6.4) | |
| static const constexpr uint8_t | SHTP_REPORT_COMMAND_RESPONSE = 0xF1U |
| See SH2 Ref. Manual 6.3.9. | |
| static const constexpr uint8_t | SHTP_REPORT_COMMAND_REQUEST = 0xF2U |
| See SH2 Ref. Manual 6.3.8. | |
| static const constexpr uint8_t | SHTP_REPORT_FRS_READ_RESPONSE = 0xF3U |
| See SH2 Ref. Manual 6.3.7. | |
| static const constexpr uint8_t | SHTP_REPORT_FRS_READ_REQUEST = 0xF4U |
| See SH2 Ref. Manual 6.3.6. | |
| static const constexpr uint8_t | SHTP_REPORT_PRODUCT_ID_RESPONSE = 0xF8U |
| See SH2 Ref. Manual 6.3.2. | |
| static const constexpr uint8_t | SHTP_REPORT_PRODUCT_ID_REQUEST = 0xF9U |
| See SH2 Ref. Manual 6.3.1. | |
| static const constexpr uint8_t | SHTP_REPORT_BASE_TIMESTAMP = 0xFBU |
| See SH2 Ref. Manual 7.2.1. | |
| static const constexpr uint8_t | SHTP_REPORT_SET_FEATURE_COMMAND = 0xFDU |
| See SH2 Ref. Manual 6.5.4. | |
| static const constexpr uint8_t | SHTP_REPORT_GET_FEATURE_RESPONSE = 0xFCU |
| See SH2 Ref. Manual 6.5.5. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_ACCELEROMETER = 0x01U |
| See SH2 Ref. Manual 6.5.9. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_GYROSCOPE = 0x02U |
| See SH2 Ref. Manual 6.5.13. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_MAGNETIC_FIELD = 0x03U |
| See SH2 Ref. Manual 6.5.16. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_LINEAR_ACCELERATION = 0x04U |
| See SH2 Ref. Manual 6.5.10. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_ROTATION_VECTOR = 0x05U |
| See SH2 Ref. Manual 6.5.18. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_GRAVITY = 0x06U |
| See SH2 Ref. Manual 6.5.11. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_UNCALIBRATED_GYRO = 0x07U |
| See SH2 Ref. Manual 6.5.14. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_GAME_ROTATION_VECTOR = 0x08U |
| See SH2 Ref. Manual 6.5.19. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_GEOMAGNETIC_ROTATION_VECTOR = 0x09U |
| See SH2 Ref. Manual 6.5.20. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_GYRO_INTEGRATED_ROTATION_VECTOR = 0x2AU |
| See SH2 Ref. Manual 6.5.44. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_TAP_DETECTOR = 0x10U |
| See SH2 Ref. Manual 6.5.27. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_STEP_COUNTER = 0x11U |
| See SH2 Ref. Manual 6.5.29. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_STABILITY_CLASSIFIER = 0x13U |
| See SH2 Ref. Manual 6.5.31. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_RAW_ACCELEROMETER = 0x14U |
| See SH2 Ref. Manual 6.5.8. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_RAW_GYROSCOPE = 0x15U |
| See SH2 Ref. Manual 6.5.12. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_RAW_MAGNETOMETER = 0x16U |
| See SH2 Ref. Manual 6.5.15. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_PERSONAL_ACTIVITY_CLASSIFIER = 0x1EU |
| See SH2 Ref. Manual 6.5.36. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_ARVR_STABILIZED_ROTATION_VECTOR = 0x28U |
| See SH2 Ref. Manual 6.5.42. | |
| static const constexpr uint8_t | SENSOR_REPORT_ID_ARVR_STABILIZED_GAME_ROTATION_VECTOR = 0x29U |
| See SH2 Ref. Manual 6.5.43. | |
| static const constexpr uint8_t | TARE_NOW = 0U |
| See SH2 Ref. Manual 6.4.4.1. | |
| static const constexpr uint8_t | TARE_PERSIST = 1U |
| See SH2 Ref. Manual 6.4.4.2. | |
| static const constexpr uint8_t | TARE_SET_REORIENTATION = 2U |
| See SH2 Ref. Manual 6.4.4.3. | |
| static const constexpr uint8_t | REPORT_CNT = 19 |
| Total unique reports that can be returned by BNO08x. | |
| static const constexpr char * | TAG = "BNO08x" |
| Class tag used for serial print statements. | |
+Friends | |
| class | BNO08xTestHelper |
BNO08x IMU driver class.
+
+
|
+ +private | +
Holds info about which functionality has been successfully initialized (used by deconstructor during cleanup).
+ +
+
|
+ +private | +
+
|
+ +private | +
Holds data that is received over spi.
+ +
+
|
+ +private | +
Holds data that is sent over spi.
+ +
+
|
+ +private | +
| BNO08x::BNO08x | +( | +bno08x_config_t | imu_config = bno08x_config_t() | ) | ++ |
BNO08x imu constructor.
+Construct a BNO08x object for managing a BNO08x sensor.
+| imu_config | Configuration settings (optional), default settings can be seen in bno08x_config_t |
| BNO08x::~BNO08x | +( | +) | ++ |
| void BNO08x::calibrate_accelerometer | +( | +) | ++ |
Sends command to calibrate accelerometer.
+
| void BNO08x::calibrate_all | +( | +) | ++ |
Sends command to calibrate accelerometer, gyro, and magnetometer.
+

| void BNO08x::calibrate_gyro | +( | +) | ++ |
Sends command to calibrate gyro.
+
| void BNO08x::calibrate_magnetometer | +( | +) | ++ |
Sends command to calibrate magnetometer.
+
| void BNO08x::calibrate_planar_accelerometer | +( | +) | ++ |
Sends command to calibrate planar accelerometer.
+
| bool BNO08x::calibration_complete | +( | +) | ++ |
Returns true if calibration has completed.
+
| void BNO08x::clear_tare | +( | +) | ++ |
Sends command to clear persistent tare settings in non-volatile memory of BNO08x (See Ref. Manual 6.4.4.3)
+
| bool BNO08x::data_available | +( | +bool | ignore_no_reports_enabled = false | ) | ++ |
Checks if BNO08x has asserted interrupt and sent data.
+| ignore_no_reports_enabled | Forces a wait for data even if no reports are enabled (default is false), used for unit tests. |


+
|
+ +private | +
Task responsible parsing packets. Executed when SPI task sends a packet to be parsed, notifies wait_for_data() call.
+

+
|
+ +staticprivate | +
Static function used to launch data processing task.
+Used such that data_proc_task() can be non-static class member.
+| arg | void pointer to BNO08x imu object |


+
|
+ +private | +
Deinitializes GPIO, called from deconstructor.
+

+
|
+ +private | +
Deinitializes GPIO inputs, called from deconstructor.
+
+
|
+ +private | +
Deinitializes GPIO outputs, called from deconstructor.
+
+
|
+ +private | +
Deinitializes host interrupt ISR, called from deconstructor.
+
+
|
+ +private | +
Deinitializes SPI.
+
| void BNO08x::disable_accelerometer | +( | +) | ++ |
Sends command to disable accelerometer reports by setting report interval to 0.
+

| void BNO08x::disable_activity_classifier | +( | +) | ++ |
Sends command to disable activity classifier reports by setting report interval to 0.
+

| void BNO08x::disable_ARVR_stabilized_game_rotation_vector | +( | +) | ++ |
Sends command to disable ARVR stabilized game rotation vector reports by setting report interval to 0.
+

| void BNO08x::disable_ARVR_stabilized_rotation_vector | +( | +) | ++ |
Sends command to disable ARVR stabilized rotation vector reports by setting report interval to 0.
+

| void BNO08x::disable_calibrated_gyro | +( | +) | ++ |
Sends command to disable calibrated gyro reports by setting report interval to 0.
+

| void BNO08x::disable_game_rotation_vector | +( | +) | ++ |
Sends command to disable game rotation vector reports by setting report interval to 0.
+

| void BNO08x::disable_gravity | +( | +) | ++ |
Sends command to disable gravity reports by setting report interval to 0.
+

| void BNO08x::disable_gyro_integrated_rotation_vector | +( | +) | ++ |
Sends command to disable gyro integrated rotation vector reports by setting report interval to 0.
+

| void BNO08x::disable_linear_accelerometer | +( | +) | ++ |
Sends command to disable linear accelerometer reports by setting report interval to 0.
+

| void BNO08x::disable_magnetometer | +( | +) | ++ |
Sends command to disable magnetometer reports by setting report interval to 0.
+

| void BNO08x::disable_raw_mems_accelerometer | +( | +) | ++ |
Sends command to disable raw accelerometer reports by setting report interval to 0.
+
| void BNO08x::disable_raw_mems_gyro | +( | +) | ++ |
Sends command to disable raw gyro reports by setting report interval to 0.
+
| void BNO08x::disable_raw_mems_magnetometer | +( | +) | ++ |
Sends command to disable raw magnetometer reports by setting report interval to 0.
+
+
|
+ +private | +
Disables a sensor report for a given ID by setting its time interval to 0.
+| report_ID | The report ID of the sensor, i.e. SENSOR_REPORT_ID_X |
| report_evt_grp_bit | The event group bit for the respective report, to indicate to spi_task() it's disabled, i.e. EVT_GRP_RPT_X |
If no reports are enabled after disabling, this function will disable interrupts on hint pin.
+

| void BNO08x::disable_rotation_vector | +( | +) | ++ |
Sends command to disable rotation vector reports by setting report interval to 0.
+

| void BNO08x::disable_stability_classifier | +( | +) | ++ |
Sends command to disable stability reports by setting report interval to 0.
+

| void BNO08x::disable_step_counter | +( | +) | ++ |
Sends command to disable step counter reports by setting report interval to 0.
+

| void BNO08x::disable_tap_detector | +( | +) | ++ |
Sends command to disable tap detector reports by setting report interval to 0.
+
| void BNO08x::disable_uncalibrated_gyro | +( | +) | ++ |
Sends command to disable uncalibrated gyro reports by setting report interval to 0.
+

| void BNO08x::enable_accelerometer | +( | +uint32_t | time_between_reports | ) | ++ |
Sends command to enable accelerometer reports (See Ref. Manual 6.5.9)
+| time_between_reports | Desired time between reports in microseconds. |


| void BNO08x::enable_activity_classifier | +( | +uint32_t | time_between_reports, | +
| + | + | BNO08xActivityEnable | activities_to_enable, | +
| + | + | uint8_t(&) | activity_confidence_vals[9] ) | +
Sends command to enable activity classifier reports (See Ref. Manual 6.5.36)
+| time_between_reports | Desired time between reports in microseconds. |
| activities_to_enable | Desired activities to enable (0x1F enables all). |
| activity_confidence_vals | Returned activity level confidences. |


| void BNO08x::enable_ARVR_stabilized_game_rotation_vector | +( | +uint32_t | time_between_reports | ) | ++ |
Sends command to enable ARVR stabilized game rotation vector reports (See Ref. Manual 6.5.43)
+| time_between_reports | Desired time between reports in microseconds. |


| void BNO08x::enable_ARVR_stabilized_rotation_vector | +( | +uint32_t | time_between_reports | ) | ++ |
Sends command to enable ARVR stabilized rotation vector reports (See Ref. Manual 6.5.42)
+| time_between_reports | Desired time between reports in microseconds. |


| void BNO08x::enable_calibrated_gyro | +( | +uint32_t | time_between_reports | ) | ++ |
Sends command to enable calibrated gyro reports (See Ref. Manual 6.5.13)
+| time_between_reports | Desired time between reports in microseconds. |


| void BNO08x::enable_game_rotation_vector | +( | +uint32_t | time_between_reports | ) | ++ |
Sends command to enable game rotation vector reports (See Ref. Manual 6.5.19)
+| time_between_reports | Desired time between reports in microseconds. |


| void BNO08x::enable_gravity | +( | +uint32_t | time_between_reports | ) | ++ |
Sends command to enable gravity reading reports (See Ref. Manual 6.5.11)
+| time_between_reports | Desired time between reports in microseconds. |


| void BNO08x::enable_gyro_integrated_rotation_vector | +( | +uint32_t | time_between_reports | ) | ++ |
Sends command to enable gyro integrated rotation vector reports (See Ref. Manual 6.5.44)
+| time_between_reports | Desired time between reports in microseconds. |


| void BNO08x::enable_linear_accelerometer | +( | +uint32_t | time_between_reports | ) | ++ |
Sends command to enable linear accelerometer reports (See Ref. Manual 6.5.10)
+| time_between_reports | Desired time between reports in microseconds. |


| void BNO08x::enable_magnetometer | +( | +uint32_t | time_between_reports | ) | ++ |
Sends command to enable magnetometer reports (See Ref. Manual 6.5.16)
+| time_between_reports | Desired time between reports in microseconds. |


| void BNO08x::enable_raw_mems_accelerometer | +( | +uint32_t | time_between_reports | ) | ++ |
Sends command to enable raw MEMs accelerometer reports (See Ref. Manual 6.5.8)
+| time_between_reports | Desired time between reports in microseconds. |

| void BNO08x::enable_raw_mems_gyro | +( | +uint32_t | time_between_reports | ) | ++ |
Sends command to enable raw MEMs gyro reports (See Ref. Manual 6.5.12)
+| time_between_reports | Desired time between reports in microseconds. |

| void BNO08x::enable_raw_mems_magnetometer | +( | +uint32_t | time_between_reports | ) | ++ |
Sends command to enable raw MEMs magnetometer reports (See Ref. Manual 6.5.15)
+| time_between_reports | Desired time between reports in microseconds. |

+
|
+ +private | +
Enables a sensor report for a given ID.
+| report_ID | The report ID of the sensor, i.e. SENSOR_REPORT_ID_X |
| time_between_reports | The desired time in microseconds between each report. The BNO08x will send reports according to this interval. |
| report_evt_grp_bit | The event group bit for the respective report, to indicate to spi_task() it's enabled, i.e. EVT_GRP_RPT_X |
If no reports were enabled prior to call, this function will re-enable interrupts on hint pin.
+

| void BNO08x::enable_rotation_vector | +( | +uint32_t | time_between_reports | ) | ++ |
Sends command to enable rotation vector reports (See Ref. Manual 6.5.18)
+| time_between_reports | Desired time between reports in microseconds. |


| void BNO08x::enable_stability_classifier | +( | +uint32_t | time_between_reports | ) | ++ |
Sends command to enable activity stability classifier reports (See Ref. Manual 6.5.31)
+| time_between_reports | Desired time between reports in microseconds. |


| void BNO08x::enable_step_counter | +( | +uint32_t | time_between_reports | ) | ++ |
Sends command to enable step counter reports (See Ref. Manual 6.5.29)
+| time_between_reports | Desired time between reports in microseconds. |


| void BNO08x::enable_tap_detector | +( | +uint32_t | time_between_reports | ) | ++ |
Sends command to enable tap detector reports (See Ref. Manual 6.5.27)
+| time_between_reports | Desired time between reports in microseconds. |

| void BNO08x::enable_uncalibrated_gyro | +( | +uint32_t | time_between_reports | ) | ++ |
Sends command to enable uncalibrated gyro reports (See Ref. Manual 6.5.14)
+| time_between_reports | Desired time between reports in microseconds. |


| void BNO08x::end_calibration | +( | +) | ++ |
Sends command to end calibration procedure.
+
+
|
+ +private | +


| bool BNO08x::FRS_read_data | +( | +uint16_t | record_ID, | +
| + | + | uint8_t | start_location, | +
| + | + | uint8_t | words_to_read ) | +
Read meta data from BNO08x FRS (flash record system) given the record ID. Contains Q points and other info. (See Ref. Manual 5.1 & 6.3.7)
+Note that Q points from the data sheet can be used as well, using the ones stored in flash is optional.
+| record_ID | Which record ID/ sensor to request meta data from. |
| start_location | Start byte location. |
| words_to_read | Length of words to read. |


| bool BNO08x::FRS_read_request | +( | +uint16_t | record_ID, | +
| + | + | uint16_t | read_offset, | +
| + | + | uint16_t | block_size ) | +
Requests meta data from BNO08x FRS (flash record system) given the record ID. Contains Q points and other info. (See Ref. Manual 5.1 & 6.3.6)
+Note that Q points from the data sheet can be used as well, using the ones stored in flash is optional.
+| record_ID | Which record ID/ sensor to request meta data from. |
| start_location | Start byte location. |
| words_to_read | Length of words to read. |


| uint32_t BNO08x::FRS_read_word | +( | +uint16_t | record_ID, | +
| + | + | uint8_t | word_number ) | +
Reads meta data word from BNO08x FRS (flash record system) given the record ID and word number. (See Ref. Manual 5.1 & 6.3.7)
+Note that Q points from the data sheet can be used as well, using the ones stored in flash is optional.
+| record_ID | Which record ID/ sensor to request meta data from. |
| word_number | Desired word to read. |


| void BNO08x::get_accel | +( | +float & | x, | +
| + | + | float & | y, | +
| + | + | float & | z, | +
| + | + | BNO08xAccuracy & | accuracy ) | +
Get full acceleration (total acceleration of device, units in m/s^2).
+| x | Reference variable to save X axis acceleration. |
| y | Reference variable to save Y axis acceleration. |
| z | Reference variable to save Z axis acceleration. |
| accuracy | Reference variable to save reported acceleration accuracy. |


| BNO08xAccuracy BNO08x::get_accel_accuracy | +( | +) | ++ |
Get accuracy of linear acceleration.
+| float BNO08x::get_accel_X | +( | +) | ++ |
Get x axis acceleration (total acceleration of device, units in m/s^2).
+
| float BNO08x::get_accel_Y | +( | +) | ++ |
Get y axis acceleration (total acceleration of device, units in m/s^2).
+
| float BNO08x::get_accel_Z | +( | +) | ++ |
Get z axis acceleration (total acceleration of device, units in m/s^2).
+
| BNO08xActivity BNO08x::get_activity_classifier | +( | +) | ++ |
Get the current activity classifier (Seee Ref. Manual 6.5.36)
+
| void BNO08x::get_calibrated_gyro_velocity | +( | +float & | x, | +
| + | + | float & | y, | +
| + | + | float & | z ) | +
Get full rotational velocity with drift compensation (units in Rad/s).
+| x | Reference variable to save X axis angular velocity |
| y | Reference variable to save Y axis angular velocity |
| z | Reference variable to save Z axis angular velocity |


| float BNO08x::get_calibrated_gyro_velocity_X | +( | +) | ++ |
Get calibrated gyro x axis angular velocity measurement.
+
| float BNO08x::get_calibrated_gyro_velocity_Y | +( | +) | ++ |
Get calibrated gyro y axis angular velocity measurement.
+
| float BNO08x::get_calibrated_gyro_velocity_Z | +( | +) | ++ |
Get calibrated gyro z axis angular velocity measurement.
+
| void BNO08x::get_gravity | +( | +float & | x, | +
| + | + | float & | y, | +
| + | + | float & | z, | +
| + | + | BNO08xAccuracy & | accuracy ) | +
Get full reported gravity vector, units in m/s^2.
+| x | Reference variable to save X axis gravity. |
| y | Reference variable to save Y axis axis gravity. |
| z | Reference variable to save Z axis axis gravity. |
| accuracy | Reference variable to save reported gravity accuracy. |


| BNO08xAccuracy BNO08x::get_gravity_accuracy | +( | +) | ++ |
Get the reported gravity accuracy.
+| float BNO08x::get_gravity_X | +( | +) | ++ |
Get the reported x axis gravity.
+
| float BNO08x::get_gravity_Y | +( | +) | ++ |
Get the reported y axis gravity.
+
| float BNO08x::get_gravity_Z | +( | +) | ++ |
Get the reported z axis gravity.
+
| void BNO08x::get_integrated_gyro_velocity | +( | +float & | x, | +
| + | + | float & | y, | +
| + | + | float & | z ) | +
Full rotational velocity from gyro-integrated rotation vector (See Ref. Manual 6.5.44)
+| x | Reference variable to save X axis angular velocity |
| y | Reference variable to save Y axis angular velocity |
| z | Reference variable to save Z axis angular velocity |


| float BNO08x::get_integrated_gyro_velocity_X | +( | +) | ++ |
Get x axis angular velocity from gyro-integrated rotation vector. (See Ref. Manual 6.5.44)
+
| float BNO08x::get_integrated_gyro_velocity_Y | +( | +) | ++ |
Get y axis angular velocity from gyro-integrated rotation vector. (See Ref. Manual 6.5.44)
+
| float BNO08x::get_integrated_gyro_velocity_Z | +( | +) | ++ |
Get z axis angular velocity from gyro-integrated rotation vector. (See Ref. Manual 6.5.44)
+
| void BNO08x::get_linear_accel | +( | +float & | x, | +
| + | + | float & | y, | +
| + | + | float & | z, | +
| + | + | BNO08xAccuracy & | accuracy ) | +
Get full linear acceleration (acceleration of the device minus gravity, units in m/s^2).
+| x | Reference variable to save X axis acceleration. |
| y | Reference variable to save Y axis acceleration. |
| z | Reference variable to save Z axis acceleration. |
| accuracy | Reference variable to save reported linear acceleration accuracy. |


| BNO08xAccuracy BNO08x::get_linear_accel_accuracy | +( | +) | ++ |
Get accuracy of linear acceleration.
+| float BNO08x::get_linear_accel_X | +( | +) | ++ |
Get x axis linear acceleration (acceleration of device minus gravity, units in m/s^2)
+
| float BNO08x::get_linear_accel_Y | +( | +) | ++ |
Get y axis linear acceleration (acceleration of device minus gravity, units in m/s^2)
+
| float BNO08x::get_linear_accel_Z | +( | +) | ++ |
Get z axis linear acceleration (acceleration of device minus gravity, units in m/s^2)
+
| void BNO08x::get_magf | +( | +float & | x, | +
| + | + | float & | y, | +
| + | + | float & | z, | +
| + | + | BNO08xAccuracy & | accuracy ) | +
Get the full magnetic field vector.
+| x | Reference variable to save reported x magnitude. |
| y | Reference variable to save reported y magnitude. |
| x | Reference variable to save reported z magnitude. |
| accuracy | Reference variable to save reported accuracy. |


| BNO08xAccuracy BNO08x::get_magf_accuracy | +( | +) | ++ |
Get accuracy of reported magnetic field vector.
+
| float BNO08x::get_magf_X | +( | +) | ++ |
Get X component of magnetic field vector.
+

| float BNO08x::get_magf_Y | +( | +) | ++ |
Get Y component of magnetic field vector.
+

| float BNO08x::get_magf_Z | +( | +) | ++ |
Get Z component of magnetic field vector.
+

| float BNO08x::get_pitch | +( | +) | ++ |
Get the reported rotation about y axis.
+

| float BNO08x::get_pitch_deg | +( | +) | ++ |
Get the reported rotation about y axis.
+
| int16_t BNO08x::get_Q1 | +( | +uint16_t | record_ID | ) | ++ |
Gets Q1 point from BNO08x FRS (flash record system).
+Note that Q points from the data sheet can be used as well, using the ones stored in flash is optional.
+| record_ID | Which record ID/ sensor to get Q1 value for. |


| int16_t BNO08x::get_Q2 | +( | +uint16_t | record_ID | ) | ++ |
Gets Q2 point from BNO08x FRS (flash record system).
+Note that Q points from the data sheet can be used as well, using the ones stored in flash is optional.
+| record_ID | Which record ID/ sensor to get Q2 value for. |

| int16_t BNO08x::get_Q3 | +( | +uint16_t | record_ID | ) | ++ |
Gets Q3 point from BNO08x FRS (flash record system).
+Note that Q points from the data sheet can be used as well, using the ones stored in flash is optional.
+| record_ID | Which record ID/ sensor to get Q3 value for. |

| void BNO08x::get_quat | +( | +float & | i, | +
| + | + | float & | j, | +
| + | + | float & | k, | +
| + | + | float & | real, | +
| + | + | float & | rad_accuracy, | +
| + | + | BNO08xAccuracy & | accuracy ) | +
Get the full quaternion reading.
+| i | Reference variable to save reported i component of quaternion. |
| j | Reference variable to save reported j component of quaternion. |
| k | Reference variable to save reported k component of quaternion. |
| real | Reference variable to save reported real component of quaternion. |
| rad_accuracy | Reference variable to save reported raw quaternion radian accuracy. |
| accuracy | Reference variable to save reported quaternion accuracy. |


| BNO08xAccuracy BNO08x::get_quat_accuracy | +( | +) | ++ |
Get accuracy of reported quaternion.
+
| float BNO08x::get_quat_I | +( | +) | ++ |
Get I component of reported quaternion.
+

| float BNO08x::get_quat_J | +( | +) | ++ |
Get J component of reported quaternion.
+

| float BNO08x::get_quat_K | +( | +) | ++ |
Get K component of reported quaternion.
+

| float BNO08x::get_quat_radian_accuracy | +( | +) | ++ |
Get radian accuracy of reported quaternion.
+
| float BNO08x::get_quat_real | +( | +) | ++ |
Get real component of reported quaternion.
+

| float BNO08x::get_range | +( | +uint16_t | record_ID | ) | ++ |
Gets range from BNO08x FRS (flash record system).
+| record_ID | Which record ID/ sensor to get range value for. |

| void BNO08x::get_raw_mems_accel | +( | +uint16_t & | x, | +
| + | + | uint16_t & | y, | +
| + | + | uint16_t & | z ) | +
Get full raw acceleration from physical accelerometer MEMs sensor (See Ref. Manual 6.5.8).
+| x | Reference variable to save raw X axis acceleration. |
| y | Reference variable to save raw Y axis acceleration. |
| z | Reference variable to save raw Z axis acceleration. |
| uint16_t BNO08x::get_raw_mems_accel_X | +( | +) | ++ |
Get raw accelerometer x axis reading from physical accelerometer MEMs sensor (See Ref. Manual 6.5.8)
+| uint16_t BNO08x::get_raw_mems_accel_Y | +( | +) | ++ |
Get raw accelerometer y axis reading from physical accelerometer MEMs sensor (See Ref. Manual 6.5.8)
+| uint16_t BNO08x::get_raw_mems_accel_Z | +( | +) | ++ |
Get raw accelerometer z axis reading from physical accelerometer MEMs sensor (See Ref. Manual 6.5.8)
+| void BNO08x::get_raw_mems_gyro | +( | +uint16_t & | x, | +
| + | + | uint16_t & | y, | +
| + | + | uint16_t & | z ) | +
Get raw gyroscope full reading from physical gyroscope MEMs sensor (See Ref. Manual 6.5.12)
+| x | Reference variable to save raw X axis data. |
| y | Reference variable to save raw Y axis data. |
| z | Reference variable to save raw Z axis data. |

| uint16_t BNO08x::get_raw_mems_gyro_X | +( | +) | ++ |
Get raw gyroscope x axis reading from physical gyroscope MEMs sensor (See Ref. Manual 6.5.12)
+| uint16_t BNO08x::get_raw_mems_gyro_Y | +( | +) | ++ |
Get raw gyroscope y axis reading from physical gyroscope MEMs sensor (See Ref. Manual 6.5.12)
+| uint16_t BNO08x::get_raw_mems_gyro_Z | +( | +) | ++ |
Get raw gyroscope z axis reading from physical gyroscope MEMs sensor (See Ref. Manual 6.5.12)
+| void BNO08x::get_raw_mems_magf | +( | +uint16_t & | x, | +
| + | + | uint16_t & | y, | +
| + | + | uint16_t & | z ) | +
Get raw magnetometer full reading from physical magnetometer sensor (See Ref. Manual 6.5.15)
+| x | Reference variable to save raw X axis data. |
| y | Reference variable to save raw Y axis data. |
| z | Reference variable to save raw Z axis data. |
| uint16_t BNO08x::get_raw_mems_magf_X | +( | +) | ++ |
Get raw magnetometer x axis reading from physical magnetometer sensor (See Ref. Manual 6.5.15)
+| uint16_t BNO08x::get_raw_mems_magf_Y | +( | +) | ++ |
Get raw magnetometer y axis reading from physical magnetometer sensor (See Ref. Manual 6.5.15)
+| uint16_t BNO08x::get_raw_mems_magf_Z | +( | +) | ++ |
Get raw magnetometer z axis reading from physical magnetometer sensor (See Ref. Manual 6.5.15)
+| BNO08xResetReason BNO08x::get_reset_reason | +( | +) | ++ |
Requests product ID, prints the returned info over serial, and returns the reason for the most resent reset.
+

| float BNO08x::get_resolution | +( | +uint16_t | record_ID | ) | ++ |
Gets resolution from BNO08x FRS (flash record system).
+| record_ID | Which record ID/ sensor to get resolution value for. |

| float BNO08x::get_roll | +( | +) | ++ |
Get the reported rotation about x axis.
+

| float BNO08x::get_roll_deg | +( | +) | ++ |
Get the reported rotation about x axis.
+
| BNO08xStability BNO08x::get_stability_classifier | +( | +) | ++ |
Get the current stability classifier (Seee Ref. Manual 6.5.31)
+
| uint16_t BNO08x::get_step_count | +( | +) | ++ |
Get the counted amount of steps.
+
| uint8_t BNO08x::get_tap_detector | +( | +) | ++ |
Get if tap has occured.
+| uint32_t BNO08x::get_time_stamp | +( | +) | ++ |
Return timestamp of most recent report.
+| float BNO08x::get_uncalibrated_gyro_bias_X | +( | +) | ++ |
Get uncalibrated gyro x axis drift estimate.
+
| float BNO08x::get_uncalibrated_gyro_bias_Y | +( | +) | ++ |
Get uncalibrated gyro Y axis drift estimate.
+
| float BNO08x::get_uncalibrated_gyro_bias_Z | +( | +) | ++ |
Get uncalibrated gyro Z axis drift estimate.
+
| void BNO08x::get_uncalibrated_gyro_velocity | +( | +float & | x, | +
| + | + | float & | y, | +
| + | + | float & | z, | +
| + | + | float & | b_x, | +
| + | + | float & | b_y, | +
| + | + | float & | b_z ) | +
Get full rotational velocity without drift compensation (units in Rad/s). An estimate of drift is given but not applied.
+| x | Reference variable to save X axis angular velocity |
| y | Reference variable to save Y axis angular velocity |
| z | Reference variable to save Z axis angular velocity |
| b_x | Reference variable to save X axis drift estimate |
| b_y | Reference variable to save Y axis drift estimate |
| b_z | Reference variable to save Z axis drift estimate |


| float BNO08x::get_uncalibrated_gyro_velocity_X | +( | +) | ++ |
Get uncalibrated gyro x axis angular velocity measurement.
+
| float BNO08x::get_uncalibrated_gyro_velocity_Y | +( | +) | ++ |
Get uncalibrated gyro Y axis angular velocity measurement.
+
| float BNO08x::get_uncalibrated_gyro_velocity_Z | +( | +) | ++ |
Get uncalibrated gyro Z axis angular velocity measurement.
+
| float BNO08x::get_yaw | +( | +) | ++ |
Get the reported rotation about z axis.
+

| float BNO08x::get_yaw_deg | +( | +) | ++ |
Get the reported rotation about z axis.
+
| bool BNO08x::hard_reset | +( | +) | ++ |
Hard resets BNO08x sensor.
+

+
|
+ +staticprivate | +
+
|
+ +private | +
Initializes required esp-idf SPI data structures with values from user passed bno08x_config_t struct.
+

+
|
+ +private | +
Initializes required gpio.
+

+
|
+ +private | +
Initializes required gpio inputs.
+
+
|
+ +private | +
Initializes required gpio outputs.
+
+
|
+ +private | +
Initializes host interrupt ISR.
+

+
|
+ +private | +
Initializes SPI.
+
| bool BNO08x::initialize | +( | +) | ++ |
Initializes BNO08x sensor.
+Resets sensor and goes through initialization process. Configures GPIO, required ISRs, and launches two tasks, one to manage SPI transactions, another to process any received data.
+

+
|
+ +private | +
Deletes spi_task and data_proc_task safely on deconstructor call.
+
+
|
+ +private | +
Launches spi_task and data_proc_task on constructor call.
+

| bool BNO08x::mode_on | +( | +) | ++ |
Turns on/ brings BNO08x sensor out of sleep mode using executable channel.
+
| bool BNO08x::mode_sleep | +( | +) | ++ |
Puts BNO08x sensor into sleep/low power mode using executable channel.
+
+
|
+ +private | +
Parses received command report sent by BNO08x (See Ref. Manual 6.3.9)
+
+
|
+ +private | +
Parses get feature request report received from BNO08x.
+Note there is no means in this library currently to request feature reports, this is simply to handle the unsolicited get feature request reports that come with report rate changes (ie when a report is disabled by setting it 0) such that they aren't detected as invalid packets.
+"6.5.5 of SH-2 Ref manual: "Note that SH-2 protocol version 1.0.1 and higher will send Get Feature Response messages unsolicited if a sensor’s rate changes (e.g. due to change in the rate of a related sensor."
+| packet | bno8x_rx_packet_t containing the get feature request report to parse. |

+
|
+ +private | +
Sends packet to be parsed to meta data function call (FRS_read_data()) through queue.
+| packet | The packet containing the frs read report. |

+
|
+ +private | +
Parses received gyro integrated rotation vector report sent by BNO08x.
+Unit responds with packet that contains the following:
+packet->header[0:3]: First, a 4 byte header packet->body[0:1]: Raw quaternion component I packet->body[2:3]: Raw quaternion component J packet->body[4:5]: Raw quaternion component K packet->body[6:7]: Raw quaternion real component packet->body[8:9]: Raw gyroscope angular velocity in X axis packet->body[10:11]: Raw gyroscope angular velocity in Y axis packet->body[12:13]: Raw gyroscope angular velocity in Z axis
+| packet | bno8x_rx_packet_t containing the gyro integrated rotation vector report report to parse |


+
|
+ +private | +
Parses received input report sent by BNO08x.
+Unit responds with packet that contains the following:
+packet->header[0:3]: First, a 4 byte header packet->body[0:4]: Then a 5 byte timestamp of microsecond ticks since reading was taken packet->body[5 + 0]: Then a feature report ID (0x01 for Accel, 0x05 for Rotation Vector, etc...) packet->body[5 + 1]: Sequence number (See Ref.Manual 6.5.8.2) packet->body[5 + 2]: Status packet->body[3]: Delay packet->body[4:5]: i/accel x/gyro x/etc packet->body[6:7]: j/accel y/gyro y/etc packet->body[8:9]: k/accel z/gyro z/etc packet->body[10:11]: real/gyro temp/etc packet->body[12:13]: Accuracy estimate
+| packet | bno8x_rx_packet_t containing the input report to parse |


+
|
+ +private | +
Parses data from received input report.
+| packet | bno8x_rx_packet_t containing the input report to parse |
| data | uint16_t array to store parsed data in |
| data_length | length of data in bytes parsed from packet header |

+
|
+ +private | +
Parses a packet received from bno08x, updating any data according to received reports.
+| packet | The packet to be parsed. |
| notify_users | Bool reference that is set to true if users should be notified of new data through callbacks/polling, false if packet is valid but users don't need to be notified. |


+
|
+ +private | +
Parses product id report and prints device info.
+| packet | The packet containing product id report. |

+
|
+ +private | +
Prints the header of the passed SHTP packet to serial console with ESP_LOG statement.
+| packet | The packet containing the header to be printed. |
+
|
+ +private | +
Prints the passed SHTP packet to serial console with ESP_LOG statement.
+| packet | The packet to be printed. |

| float BNO08x::q_to_float | +( | +int16_t | fixed_point_value, | +
| + | + | uint8_t | q_point ) | +
Converts a register value to a float using its associated Q point. (See https://en.wikipedia.org/wiki/Q_(number_format))
+| q_point | Q point value associated with register. |
| fixed_point_value | The fixed point value to convert. |

+
|
+ +private | +
Queues a packet containing a command to calibrate the specified sensor.
+| sensor_to_calibrate | The sensor to calibrate. |


+
|
+ +private | +
Queues a packet containing a command.
+| command | The command to be sent. |
| commands | Command data array, pre-packed with exception of first 3 elements (command info) |


+
|
+ +private | +
Queues a packet containing a command with a request for sensor reports, reported periodically. (See Ref. Manual 6.5.4)
+| report_ID | ID of sensor report to be enabled. |
| time_between_reports | Desired time between reports in microseconds. |
| specific_config | Specific config word (used with personal activity classifier) |


+
|
+ +private | +
Queues an SHTP packet to be sent via SPI.
+| SHTP | channel number |
| data_length | data length in bytes |
| commands | array containing data to be sent |

+
|
+ +private | +
Queues a packet containing the request product ID command.
+

+
|
+ +private | +
Queues a packet containing a command related to zeroing sensor's axes. (See Ref. Manual 6.4.4.1)
+| command | Tare command to be sent. |
| axis | Specified axis (can be z or all at once) |
| rotation_vector_basis | Which rotation vector type to zero axes of, BNO08x saves seperate data for Rotation Vector, Gaming Rotation Vector, etc..) |


+
|
+ +private | +
Receives a SHTP packet via SPI and sends it to data_proc_task()
+

+
|
+ +private | +
Receives a SHTP packet body via SPI.
+| packet | Pointer to bno08x_rx_packet_t to save body to. |

+
|
+ +private | +
Receives a SHTP packet header via SPI.
+| packet | Pointer to bno08x_rx_packet_t to save header to. |

| void BNO08x::register_cb | +( | +std::function< void()> | cb_fxn | ) | ++ |
Registers a callback to execute when new data from a report is received.
+| cb_fxn | Pointer to the call-back function should be of void return type and void input parameters. |
+
|
+ +staticprivate | +
Converts report id to respective index in report_period_trackers.
+| report_ID | report ID to return index for. |

| void BNO08x::request_calibration_status | +( | +) | ++ |
Requests ME calibration status from BNO08x (see Ref. Manual 6.4.7.2)
+

| void BNO08x::reset_all_data_to_defaults | +( | +) | ++ |
Resets all data returned by public getter APIs to initial values of 0 and low accuracy.
+
| bool BNO08x::run_full_calibration_routine | +( | +) | ++ |
Runs full calibration routine.
+Enables game rotation vector and magnetometer, starts ME calibration process. Waits for accuracy of returned quaternions and magnetic field vectors to be high, then saves calibration data and returns.
+
| void BNO08x::save_calibration | +( | +) | ++ |
Sends command to save internal calibration data (See Ref. Manual 6.4.7).
+

| void BNO08x::save_tare | +( | +) | ++ |
Sends command to save tare into non-volatile memory of BNO08x (See Ref. Manual 6.4.4.2)
+
+
|
+ +private | +
Sends a queued SHTP packet via SPI.
+| packet | The packet queued to be sent. |

| bool BNO08x::soft_reset | +( | +) | ++ |
Soft resets BNO08x sensor using executable channel.
+
+
|
+ +private | +
Task responsible for SPI transactions. Executed when HINT in is asserted by BNO08x.
+

+
|
+ +staticprivate | +
Static function used to launch spi task.
+Used such that spi_task() can be non-static class member.
+| arg | void pointer to BNO08x imu object |


| void BNO08x::tare_now | +( | +uint8_t | axis_sel = TARE_AXIS_ALL, | +
| + | + | uint8_t | rotation_vector_basis = TARE_ROTATION_VECTOR ) | +
Sends command to tare an axis (See Ref. Manual 6.4.4.1)
+| axis_sel | Which axes to zero, can be TARE_AXIS_ALL (all axes) or TARE_AXIS_Z (only yaw) |
| rotation_vector_basis | Which rotation vector type to zero axes can be TARE_ROTATION_VECTOR, TARE_GAME_ROTATION_VECTOR, TARE_GEOMAGNETIC_ROTATION_VECTOR, etc.. |

+
|
+ +private | +
Updates accelerometer data from parsed input report.
+| data | uint16_t array containing parsed input report data. |
| status | uint8_t containing parsed status bits (represents accuracy) |

+
|
+ +private | +
Updates linear gyro data from parsed input report.
+| data | uint16_t array containing parsed input report data. |
| status | uint8_t containing parsed status bits (represents accuracy) |

+
|
+ +private | +
Updates command data from parsed input report.
+| packet | bno08x_rx_packet_t containing the packet with command response report. |

+
|
+ +private | +
Updates gravity data from parsed input report.
+| data | uint16_t array containing parsed input report data. |
| status | uint8_t containing parsed status bits (represents accuracy) |

+
|
+ +private | +
Updates integrated gyro rotation vector data from SHTP channel 5 (CHANNEL_GYRO) special report data.
+| packet | bno08x_rx_packet_t containing the packet with command response report. |

+
|
+ +private | +
Updates linear accelerometer data from parsed input report.
+| data | uint16_t array containing parsed input report data. |
| status | uint8_t containing parsed status bits (represents accuracy) |

+
|
+ +private | +
Updates magnetic field data from parsed input report.
+| data | uint16_t array containing parsed input report data. |
| status | uint8_t containing parsed status bits (represents accuracy) |

+
|
+ +private | +
Updates activity classifier data from parsed input report.
+| packet | bno08x_rx_packet_t containing the packet with activity classifier report. |

+
|
+ +private | +
Updates raw accelerometer data from parsed input report.
+| data | uint16_t array containing parsed input report data. |

+
|
+ +private | +
Updates raw gyro data from parsed input report.
+| data | uint16_t array containing parsed input report data. |

+
|
+ +private | +
Updates raw magnetic field data from parsed input report.
+| data | uint16_t array containing parsed input report data. |

+
|
+ +private | +
Updates period of respective report in report_period_trackers and recalculates host_int_timeout_ms according to next longest report period.
+| report_ID | report ID to update period of. |


+
|
+ +private | +
Updates roation vector data from parsed input report.
+| data | uint16_t array containing parsed input report data. |
| status | uint8_t containing parsed status bits (represents accuracy) |

+
|
+ +private | +
Updates stability classifier data from parsed input report.
+| packet | bno08x_rx_packet_t containing the packet with stability classifier report. |

+
|
+ +private | +
Updates step counter data from parsed input report.
+| data | uint16_t array containing parsed input report data. |

+
|
+ +private | +
Updates tap detector data from parsed input report.
+| packet | bno08x_rx_packet_t containing the packet with tap detector report. |

+
|
+ +private | +
Updates uncalibrated gyro data from parsed input report.
+| data | uint16_t array containing parsed input report data. |
| status | uint8_t containing parsed status bits (represents accuracy) |

+
|
+ +private | +
Waits for a valid or invalid packet to be received or host_int_timeout_ms to elapse.
+If no reports are currently enabled the hint pin interrupt will be re-enabled by this function.
+
+
|
+ +private | +
Waits for data to be received over SPI, or host_int_timeout_ms to elapse.
+If no reports are currently enabled the hint pin interrupt will be re-enabled by this function. This function is for when the validity of packets is not a concern, it is for flushing packets we do not care about.
+
+
|
+ +private | +
Waits for a queued packet to be sent or host_int_timeout_ms to elapse.
+If no reports are currently enabled the hint pin interrupt will be re-enabled by this function.
+
+
|
+ +friend | +
+
|
+ +private | +
Raw acceleration readings (See SH-2 Ref. Manual 6.5.8)
+ +
+
|
+ +private | +
Raw linear acceleration (See SH-2 Ref. Manual 6.5.10)
+ +
+
|
+ +staticconstexpr | +
Acceleration Q point (See SH-2 Ref. Manual 6.5.9)
+ +
+
|
+ +private | +
BNO08xActivity status reading (See SH-2 Ref. Manual 6.5.36)
+ +
+
|
+ +private | +
Confidence of read activities (See SH-2 Ref. Manual 6.5.36)
+ +
+
|
+ +staticconstexpr | +
Angular velocity Q point (See SH-2 Ref. Manual 6.5.44)
+ +
+
|
+ +private | +
SPI bus GPIO configuration settings.
+ +
+
|
+ +staticconstexprprivate | +
Calibrate accelerometer command used by queue_calibrate_command.
+ +
+
|
+ +staticconstexprprivate | +
Calibrate accelerometer, gyro, & magnetometer command used by queue_calibrate_command.
+ +
+
|
+ +staticconstexprprivate | +
Calibrate gyro command used by queue_calibrate_command.
+ +
+
|
+ +staticconstexprprivate | +
Calibrate magnetometer command used by queue_calibrate_command.
+ +
+
|
+ +staticconstexprprivate | +
Calibrate planar acceleration command used by queue_calibrate_command.
+ +
+
|
+ +staticconstexprprivate | +
Stop calibration command used by queue_calibrate_command.
+ +
+
|
+ +private | +
Calibration status of device (See SH-2 Ref. Manual 6.4.7.1 & 6.4.7.2)
+ +
+
|
+ +private | +
+
|
+ +staticconstexprprivate | +
How long to delay after queueing command to allow it to execute (for ex. after sending command to enable report).
+ +
+
|
+ +staticconstexprprivate | +
Clear DCD & Reset command (See SH2 Ref. Manual 6.4)
+ +
+
|
+ +staticconstexprprivate | +
+
|
+ +staticconstexprprivate | +
Save DCD command (See SH2 Ref. Manual 6.4.7)
+ +
+
|
+ +staticconstexprprivate | +
Configure DCD periodic saving (See SH2 Ref. Manual 6.4)
+ +
+
|
+ +staticconstexprprivate | +
+
|
+ +staticconstexprprivate | +
Reinitialize sensor hub components See (SH2 Ref. Manual 6.4.5)
+ +
+
|
+ +staticconstexprprivate | +
Command and response to configure ME calibration (See SH2 Ref. Manual 6.4.7)
+ +
+
|
+ +staticconstexprprivate | +
Retrieve oscillator type command (See SH2 Ref. Manual 6.4)
+ +
+
|
+ +staticconstexprprivate | +
Command and response to tare command (See Sh2 Ref. Manual 6.4.4)
+ +
+
|
+ +private | +
ID of the currently enabled report with the largest sample period.
+ +
+
|
+ +private | +
data_proc_task() task handle
+ +
+
|
+ +private | +
Event group for indicating which reports are currently enabled.
+ +
+
|
+ +staticconstexprprivate | +
When set, accelerometer reports are active.
+ +
+
|
+ +staticconstexprprivate | +
When set, activity classifier reports are active.
+ +
+
|
+ +staticconstexprprivate | +
+
|
+ +staticconstexprprivate | +
When set, ARVR stabilized game rotation vector reports are active.
+ +
+
|
+ +staticconstexprprivate | +
When set, ARVR stabilized rotation vector reports are active.
+ +
+
|
+ +staticconstexprprivate | +
When set, game rotation vector reports are active.
+ +
+
|
+ +staticconstexprprivate | +
When set, gravity reports are active.
+ +
+
|
+ +staticconstexprprivate | +
When set, gyro reports are active.
+ +
+
|
+ +staticconstexprprivate | +
When set, gyro integrator rotation vector reports are active.
+ +
+
|
+ +staticconstexprprivate | +
When set, uncalibrated gyro reports are active.
+ +
+
|
+ +staticconstexprprivate | +
When set, linear accelerometer reports are active.
+ +
+
|
+ +staticconstexprprivate | +
When set, magnetometer reports are active.
+ +
+
|
+ +staticconstexprprivate | +
When set, raw accelerometer reports are active.
+ +
+
|
+ +staticconstexprprivate | +
When set, raw gyro reports are active.
+ +
+
|
+ +staticconstexprprivate | +
When set, raw magnetometer reports are active.
+ +
+
|
+ +staticconstexprprivate | +
When set, rotation vector reports are active.
+ +
+
|
+ +staticconstexprprivate | +
When set, stability classifier reports are active.
+ +
+
|
+ +staticconstexprprivate | +
When set, step counter reports are active.
+ +
+
|
+ +staticconstexprprivate | +
When set, tap detector reports are active.
+ +
+
|
+ +private | +
Event group for indicating when bno08x hint pin has triggered and when new data has been processed. Used by calls to sending or receiving functions.
+ +
+
|
+ +staticconstexprprivate | +
When this bit is set it indicates a receive procedure has completed.
+ +
+
|
+ +staticconstexprprivate | +
When this bit is set, it indicates an invalid packet has been received.
+ +
+
|
+ +staticconstexprprivate | +
When this bit is set, it indicates a valid packet has been received and processed.
+ +
+
|
+ +staticconstexprprivate | +
When this bit is set, it indicates a queued packet has been sent.
+ +
+
|
+ +private | +
Event group for indicating when tasks should complete and self-delete (on deconstructor call)
+ +
+
|
+ +staticconstexprprivate | +
When set, data_proc_task and spi_task are active, when 0 they are pending deletion or deleted.
+ +
+
|
+ +private | +
true only for first execution of hard_reset(), used to suppress the printing of product ID report.
+ +
+
|
+ +staticconstexpr | +
Accelerometer record ID, to be passed in metadata functions like get_Q1()
+ +
+
|
+ +staticconstexpr | +
Calirated gyroscope record ID, to be passed in metadata functions like get_Q1()
+ +
+
|
+ +staticconstexpr | +
Calibrated magnetometer record ID, to be passed in metadata functions like get_Q1()
+ +
+
|
+ +staticconstexpr | +
Rotation vector record ID, to be passed in metadata functions like get_Q1()
+ +
+
|
+ +private | +
Gravity reading in m/s^2 (See SH-2 Ref. Manual 6.5.11)
+ +
+
|
+ +staticconstexpr | +
Gravity Q point (See SH-2 Ref. Manual 6.5.11)
+ +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +staticconstexpr | +
Gyro Q point (See SH-2 Ref. Manual 6.5.13)
+ +
+
|
+ +staticconstexprprivate | +
How long RST pin is held low during hard reset (min 10ns according to datasheet, but should be longer for stable operation)
+ +
+
|
+ +staticconstexprprivate | +
Max wait between HINT being asserted by BNO08x before transaction is considered failed (in miliseconds), when no reports are enabled (ie during reset)
+ +
+
|
+ +private | +
Max wait between HINT being asserted by BNO08x before transaction is considered failed (in miliseconds), determined by enabled report with longest period.
+ +
+
|
+ +private | +
IMU configuration settings.
+ +
+
|
+ +private | +
SPI slave device settings.
+ +
+
|
+ +private | +
Initialization status of various functionality, used by deconstructor during cleanup, set during initialization.
+ +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
Raw gyro angular velocity reading from integrated gyro rotation vector (See SH-2 Ref. Manual 6.5.44)
+ +
+
|
+ +private | +
Current largest sample period of any enabled report in microseconds (used to determine timeout for hint ISR).
+ +
+
|
+ +staticconstexpr | +
Linear acceleration Q point (See SH-2 Ref. Manual 6.5.10)
+ +
+
|
+ +private | +
Calibrated magnetic field reading in uTesla (See SH-2 Ref. Manual 6.5.16)
+ +
+
|
+ +staticconstexpr | +
Magnetometer Q point (See SH-2 Ref. Manual 6.5.16)
+ +
+
|
+ +staticconstexprprivate | +
max length of metadata used in frs read operations
+ +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
Raw accelerometer readings from MEMS sensor (See SH2 Ref. Manual 6.5.8)
+ +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
Raw gyro readings from MEMS sensor (See SH-2 Ref. Manual 6.5.12)
+ +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
Raw magnetometer (compass) readings from MEMS sensor (See SH-2 Ref. Manual 6.5.15)
+ +
+
|
+ +private | +
First 9 bytes of meta data returned from FRS read operation (we don't really need the rest) (See Ref. Manual 5.1)
+ +
+
|
+ +private | +
Raw quaternion reading (See SH-2 Ref. Manual 6.5.44)
+ +
+
|
+ +private | +
Queue used to send packet body from data_proc_task to frs read functions.
+ +
+
|
+ +private | +
Queue used to send reset reason from product id report to reset_reason() function.
+ +
+
|
+ +private | +
Packet queue used to send data received from bno08x from spi_task to data_proc_task.
+ +
+
|
+ +private | +
Packet queue used to send data to be sent over SPI from sending functions to spi_task.
+ +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
Uncalibrated gyro reading (See SH-2 Ref. Manual 6.5.14)
+ +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
Raw gyro reading (See SH-2 Ref. Manual 6.5.13)
+ +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +staticconstexprprivate | +
Total unique reports that can be returned by BNO08x.
+ +
+
|
+ +private | +
Current sample period of each report in microseconds linked to report ID (0 if not enabled).
+ +
+
|
+ +staticconstexpr | +
Rotation vector accuracy estimate Q point (See SH-2 Ref. Manual 6.5.18)
+ +
+
|
+ +staticconstexpr | +
Rotation vector Q point (See SH-2 Ref. Manual 6.5.18)
+ +
+
|
+ +staticconstexprprivate | +
length buffer containing data received over spi
+ +
+
|
+ +staticconstexprprivate | +
Max SPI SCLK speed BNO08x is capable of.
+ +
+
|
+ +private | +
semaphore to count amount of killed tasks
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.9.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.43.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.42.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.19.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.20.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.11.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.44.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.13.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.10.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.16.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.36.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.8.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.12.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.15.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.18.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.31.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.29.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.27.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.14.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 7.2.1.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.3.8.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.3.9.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.3.6.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.3.7.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.5.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.3.1.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.3.2.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.5.4.
+ +
+
|
+ +private | +
SPI device handle.
+ +
+
|
+ +private | +
spi_task() handle
+ +
+
|
+ +private | +
SPI transaction handle.
+ +
+
|
+ +private | +
BNO08xStability status reading (See SH-2 Ref. Manual 6.5.31)
+ +
+
|
+ +private | +
Step counter reading (See SH-2 Ref. Manual 6.5.29)
+ +
+
|
+ +staticconstexprprivate | +
Class tag used for serial print statements.
+ +
+
|
+ +private | +
Tap detector reading (See SH-2 Ref. Manual 6.5.27)
+ +
+
|
+ +staticconstexpr | +
Tare ARVR stabilized game rotation vector.
+ +
+
|
+ +staticconstexpr | +
Tare ARVR stabilized rotation vector.
+ +
+
|
+ +staticconstexpr | +
Tare all axes (used with tare now command)
+ +
+
|
+ +staticconstexpr | +
Tar yaw axis only (used with tare now command)
+ +
+
|
+ +staticconstexpr | +
Tare game rotation vector.
+ +
+
|
+ +staticconstexpr | +
tare geomagnetic rotation vector
+ +
+
|
+ +staticconstexpr | +
Tare gyro integrated rotation vector.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.4.4.1.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.4.4.2.
+ +
+
|
+ +staticconstexpr | +
Tare rotation vector.
+ +
+
|
+ +staticconstexprprivate | +
See SH2 Ref. Manual 6.4.4.3.
+ +
+
|
+ +staticconstexprprivate | +
Total amount of tasks utilized by BNO08x driver library.
+ +
+
|
+ +private | +
Report timestamp (see datasheet 1.3.5.3)
+ +|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
This is the complete list of members for BNO08xTestHelper, including all inherited members.
+| accelerometer_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data) | BNO08xTestHelper | inlinestatic |
| activity_classifier_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data) | BNO08xTestHelper | inlinestatic |
| BNO08xAccuracy_to_str(BNO08xAccuracy accuracy) | BNO08xTestHelper | inlinestatic |
| BNO08xActivity_to_str(BNO08xActivity activity) | BNO08xTestHelper | inlinestatic |
| BNO08xStability_to_str(BNO08xStability stability) | BNO08xTestHelper | inlinestatic |
| calibrated_gyro_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data) | BNO08xTestHelper | inlinestatic |
| call_init_config_args() | BNO08xTestHelper | inlinestatic |
| call_init_gpio() | BNO08xTestHelper | inlinestatic |
| call_init_hint_isr() | BNO08xTestHelper | inlinestatic |
| call_init_spi() | BNO08xTestHelper | inlinestatic |
| call_launch_tasks() | BNO08xTestHelper | inlinestatic |
| create_test_imu() | BNO08xTestHelper | inlinestatic |
| destroy_test_imu() | BNO08xTestHelper | inlinestatic |
| get_test_imu() | BNO08xTestHelper | inlinestatic |
| gravity_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data) | BNO08xTestHelper | inlinestatic |
| gyro_integrated_rotation_vector_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data) | BNO08xTestHelper | inlinestatic |
| imu_cfg | BNO08xTestHelper | inlineprivatestatic |
| imu_report_data_t typedef | BNO08xTestHelper | |
| linear_accelerometer_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data) | BNO08xTestHelper | inlinestatic |
| magnetometer_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data) | BNO08xTestHelper | inlinestatic |
| print_test_end_banner(const char *TEST_TAG) | BNO08xTestHelper | inlinestatic |
| print_test_msg(const char *TEST_TAG, const char *msg) | BNO08xTestHelper | inlinestatic |
| print_test_start_banner(const char *TEST_TAG) | BNO08xTestHelper | inlinestatic |
| reset_all_imu_data_to_test_defaults() | BNO08xTestHelper | inlinestatic |
| rotation_vector_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data) | BNO08xTestHelper | inlinestatic |
| set_test_imu_cfg(bno08x_config_t cfg) | BNO08xTestHelper | inlinestatic |
| stability_classifier_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data) | BNO08xTestHelper | inlinestatic |
| step_counter_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data) | BNO08xTestHelper | inlinestatic |
| TAG | BNO08xTestHelper | privatestatic |
| test_imu | BNO08xTestHelper | inlineprivatestatic |
| uncalibrated_gyro_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data) | BNO08xTestHelper | inlinestatic |
| update_report_data(imu_report_data_t *report_data) | BNO08xTestHelper | inlinestatic |
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
BNO08x unit test helper class. + More...
+ +#include <BNO08xTestHelper.hpp>

+Classes | |
| struct | imu_report_data_t |
| IMU configuration settings passed into constructor. More... | |
+Public Types | |
| typedef struct BNO08xTestHelper::imu_report_data_t | imu_report_data_t |
| IMU configuration settings passed into constructor. | |
+Static Public Member Functions | |
| static void | print_test_start_banner (const char *TEST_TAG) |
| Prints test begin banner. | |
| static void | print_test_end_banner (const char *TEST_TAG) |
| Prints end begin banner. | |
| static void | print_test_msg (const char *TEST_TAG, const char *msg) |
| Prints a message during a test. | |
| static void | set_test_imu_cfg (bno08x_config_t cfg) |
| Set test imu configuration used with create_test_imu() | |
| static void | create_test_imu () |
| Calls BNO08x constructor and creates new test IMU on heap. | |
| static void | destroy_test_imu () |
| Deletes test IMU calling deconstructor and releases heap allocated memory. | |
| static BNO08x * | get_test_imu () |
| Deletes test IMU calling deconstructor and releases heap allocated memory. | |
| static esp_err_t | call_init_config_args () |
| Used to call private BNO08x::init_config_args() member for tests. | |
| static esp_err_t | call_init_gpio () |
| Used to call private BNO08x::init_gpio() member for tests. | |
| static esp_err_t | call_init_hint_isr () |
| Used to call private BNO08x::init_hint_isr() member for tests. | |
| static esp_err_t | call_init_spi () |
| Used to call private BNO08x::init_spi() member for tests. | |
| static esp_err_t | call_launch_tasks () |
| Used to call private BNO08x::launch_tasks() member for tests. | |
| static bool | rotation_vector_data_is_new (imu_report_data_t *report_data, imu_report_data_t *default_report_data) |
| Checks if report_data matches the default states stored within prev_report_data data for respective report. | |
| static bool | gyro_integrated_rotation_vector_data_is_new (imu_report_data_t *report_data, imu_report_data_t *default_report_data) |
| Checks if report_data matches the default states stored within prev_report_data data for respective report. | |
| static bool | uncalibrated_gyro_data_is_new (imu_report_data_t *report_data, imu_report_data_t *default_report_data) |
| Checks if report_data matches the default states stored within prev_report_data data for respective report. | |
| static bool | calibrated_gyro_data_is_new (imu_report_data_t *report_data, imu_report_data_t *default_report_data) |
| Checks if report_data matches the default states stored within prev_report_data data for respective report. | |
| static bool | accelerometer_data_is_new (imu_report_data_t *report_data, imu_report_data_t *default_report_data) |
| Checks if report_data matches the default states stored within prev_report_data data for respective report. | |
| static bool | linear_accelerometer_data_is_new (imu_report_data_t *report_data, imu_report_data_t *default_report_data) |
| Checks if report_data matches the default states stored within prev_report_data data for respective report. | |
| static bool | gravity_data_is_new (imu_report_data_t *report_data, imu_report_data_t *default_report_data) |
| Checks if report_data matches the default states stored within prev_report_data data for respective report. | |
| static bool | magnetometer_data_is_new (imu_report_data_t *report_data, imu_report_data_t *default_report_data) |
| Checks if report_data matches the default states stored within prev_report_data data for respective report. | |
| static bool | step_counter_data_is_new (imu_report_data_t *report_data, imu_report_data_t *default_report_data) |
| Checks if report_data matches the default states stored within prev_report_data data for respective report. | |
| static bool | stability_classifier_data_is_new (imu_report_data_t *report_data, imu_report_data_t *default_report_data) |
| Checks if report_data matches the default states stored within prev_report_data data for respective report. | |
| static bool | activity_classifier_data_is_new (imu_report_data_t *report_data, imu_report_data_t *default_report_data) |
| Checks if report_data matches the default states stored within prev_report_data data for respective report. | |
| static void | update_report_data (imu_report_data_t *report_data) |
| Updates report data with calls relevant test_imu methods. | |
| static void | reset_all_imu_data_to_test_defaults () |
| Resets internal test imu data with test defaults. | |
| static const char * | BNO08xAccuracy_to_str (BNO08xAccuracy accuracy) |
| Converts BNO08xAccuracy enum class object to string. | |
| static const char * | BNO08xStability_to_str (BNO08xStability stability) |
| Converts BNO08xStability enum class object to string. | |
| static const char * | BNO08xActivity_to_str (BNO08xActivity activity) |
| Converts BNO08xActivity enum class object to string. | |
+Static Private Attributes | |
| static BNO08x * | test_imu = nullptr |
| static bno08x_config_t | imu_cfg |
| static const constexpr char * | TAG = "BNO08xTestHelper" |
BNO08x unit test helper class.
+| typedef struct BNO08xTestHelper::imu_report_data_t BNO08xTestHelper::imu_report_data_t | +
IMU configuration settings passed into constructor.
+ +
+
|
+ +inlinestatic | +
Checks if report_data matches the default states stored within prev_report_data data for respective report.
+| report_data | Current report data. |
| default_report_data | Default report data to compare (should always contain default values) |

+
|
+ +inlinestatic | +
Checks if report_data matches the default states stored within prev_report_data data for respective report.
+| report_data | Current report data. |
| default_report_data | Default report data to compare (should always contain default values) |

+
|
+ +inlinestatic | +
Converts BNO08xAccuracy enum class object to string.
+| report_data | BNO08xAccuracy object to convert to string. |

+
|
+ +inlinestatic | +
Converts BNO08xActivity enum class object to string.
+| activity | BNO08xActivity object to convert to string. |

+
|
+ +inlinestatic | +
Converts BNO08xStability enum class object to string.
+| stability | BNO08xStability object to convert to string. |

+
|
+ +inlinestatic | +
Checks if report_data matches the default states stored within prev_report_data data for respective report.
+| report_data | Current report data. |
| default_report_data | Default report data to compare (should always contain default values) |

+
|
+ +inlinestatic | +
Used to call private BNO08x::init_config_args() member for tests.
+

+
|
+ +inlinestatic | +
Used to call private BNO08x::init_gpio() member for tests.
+

+
|
+ +inlinestatic | +
Used to call private BNO08x::init_hint_isr() member for tests.
+

+
|
+ +inlinestatic | +
Used to call private BNO08x::init_spi() member for tests.
+

+
|
+ +inlinestatic | +
Used to call private BNO08x::launch_tasks() member for tests.
+

+
|
+ +inlinestatic | +
Calls BNO08x constructor and creates new test IMU on heap.
+

+
|
+ +inlinestatic | +
Deletes test IMU calling deconstructor and releases heap allocated memory.
+
+
|
+ +inlinestatic | +
Deletes test IMU calling deconstructor and releases heap allocated memory.
+
+
|
+ +inlinestatic | +
Checks if report_data matches the default states stored within prev_report_data data for respective report.
+| report_data | Current report data. |
| default_report_data | Default report data to compare (should always contain default values) |

+
|
+ +inlinestatic | +
Checks if report_data matches the default states stored within prev_report_data data for respective report.
+| report_data | Current report data. |
| default_report_data | Default report data to compare (should always contain default values) |

+
|
+ +inlinestatic | +
Checks if report_data matches the default states stored within prev_report_data data for respective report.
+| report_data | Current report data. |
| default_report_data | Default report data to compare (should always contain default values) |

+
|
+ +inlinestatic | +
Checks if report_data matches the default states stored within prev_report_data data for respective report.
+| report_data | Current report data. |
| default_report_data | Default report data to compare (should always contain default values) |

+
|
+ +inlinestatic | +
Prints end begin banner.
+| TEST_TAG | String containing test name. |

+
|
+ +inlinestatic | +
Prints a message during a test.
+| TEST_TAG | String containing test name. |
| msg | String containing message to print. |

+
|
+ +inlinestatic | +
Prints test begin banner.
+| TEST_TAG | String containing test name. |

+
|
+ +inlinestatic | +
Resets internal test imu data with test defaults.
+
+
|
+ +inlinestatic | +
Checks if report_data matches the default states stored within prev_report_data data for respective report.
+| report_data | Current report data. |
| default_report_data | Default report data to compare (should always contain default values) |

+
|
+ +inlinestatic | +
Set test imu configuration used with create_test_imu()
+| cfg | String containing test name. |
+
|
+ +inlinestatic | +
Checks if report_data matches the default states stored within prev_report_data data for respective report.
+| report_data | Current report data. |
| default_report_data | Default report data to compare (should always contain default values) |

+
|
+ +inlinestatic | +
Checks if report_data matches the default states stored within prev_report_data data for respective report.
+| report_data | Current report data. |
| default_report_data | Default report data to compare (should always contain default values) |

+
|
+ +inlinestatic | +
Checks if report_data matches the default states stored within prev_report_data data for respective report.
+| report_data | Current report data. |
| default_report_data | Default report data to compare (should always contain default values) |

+
|
+ +inlinestatic | +
Updates report data with calls relevant test_imu methods.
+| report_data | Pointer to imu_report_data_t struct to save report data. |


+
|
+ +inlinestaticprivate | +
+
|
+ +staticconstexprprivate | +
+
|
+ +inlinestaticprivate | +
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
This is the complete list of members for BNO08xTestSuite, including all inherited members.
+| print_begin_tests_banner(const char *test_set_name) | BNO08xTestSuite | inlineprivatestatic |
| print_end_tests_banner(const char *test_set_name) | BNO08xTestSuite | inlineprivatestatic |
| run_all_tests() | BNO08xTestSuite | inlinestatic |
| run_callback_tests(bool call_unity_end_begin=true) | BNO08xTestSuite | inlinestatic |
| run_init_deinit_tests(bool call_unity_end_begin=true) | BNO08xTestSuite | inlinestatic |
| run_multi_report_tests(bool call_unity_end_begin=true) | BNO08xTestSuite | inlinestatic |
| run_single_report_tests(bool call_unity_end_begin=true) | BNO08xTestSuite | inlinestatic |
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
BNO08x unit test launch point class. + More...
+ +#include <BNO08xTestSuite.hpp>
+Static Public Member Functions | |
| static void | run_all_tests () |
| static void | run_init_deinit_tests (bool call_unity_end_begin=true) |
| static void | run_single_report_tests (bool call_unity_end_begin=true) |
| static void | run_multi_report_tests (bool call_unity_end_begin=true) |
| static void | run_callback_tests (bool call_unity_end_begin=true) |
+Static Private Member Functions | |
| static void | print_begin_tests_banner (const char *test_set_name) |
| static void | print_end_tests_banner (const char *test_set_name) |
BNO08x unit test launch point class.
+
+
|
+ +inlinestaticprivate | +

+
|
+ +inlinestaticprivate | +

+
|
+ +inlinestatic | +

+
|
+ +inlinestatic | +


+
|
+ +inlinestatic | +


+
|
+ +inlinestatic | +


+
|
+ +inlinestatic | +


|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
| File in imu_update/bno08x_update/components/esp32_BNO08x/source | Includes file in imu_update/bno08x_update/components/esp32_BNO08x/include |
|---|---|
| BNO08x.cpp | BNO08x.hpp |
| BNO08x.cpp | BNO08x_macros.hpp |
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
| File in imu_update/bno08x_update/components/esp32_BNO08x/test | Includes file in imu_update/bno08x_update/components/esp32_BNO08x/include |
|---|---|
| CallbackTests.cpp | BNO08xTestHelper.hpp |
| InitDeinitTests.cpp | BNO08xTestHelper.hpp |
| MultiReportTests.cpp | BNO08xTestHelper.hpp |
| SingleReportTests.cpp | BNO08xTestHelper.hpp |
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+

+Files | |
| CallbackTests.cpp | |
| InitDeinitTests.cpp | |
| MultiReportTests.cpp | |
| SingleReportTests.cpp | |
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+

+Files | |
| BNO08x.hpp | |
| BNO08x_global_types.hpp | |
| BNO08x_macros.hpp | |
| BNO08xTestHelper.hpp | |
| BNO08xTestSuite.hpp | |
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
| ▼ imu_update | |
| ▼ bno08x_update | |
| ▼ components | |
| ▼ esp32_BNO08x | |
| ▼ include | |
| BNO08x.hpp | |
| BNO08x_global_types.hpp | |
| BNO08x_macros.hpp | |
| BNO08xTestHelper.hpp | |
| BNO08xTestSuite.hpp | |
| ▼ source | |
| BNO08x.cpp | |
| ▼ test | |
| CallbackTests.cpp | |
| InitDeinitTests.cpp | |
| MultiReportTests.cpp | |
| SingleReportTests.cpp |
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+
This page explains how to interpret the graphs that are generated by doxygen.
+Consider the following example:
This will result in the following graph:
+
The boxes in the above graph have the following meaning:
+The arrows have the following meaning:
+|
+ esp32_BNO08x 1.2
+
+ C++ BNO08x IMU driver component for esp-idf.
+ |
+