Loading...
Searching...
No Matches
BNO08x.hpp
Go to the documentation of this file.
#pragma once
// standard library includes
#include <inttypes.h>
#include <math.h>
#include <stdio.h>
#include <cstring>
#include <functional>
#include <vector>
// esp-idf includes
#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>
// in-house includes
#include "BNO08x_global_types.hpp"
class BNO08x
{
public:
BNO08x(bno08x_config_t imu_config = bno08x_config_t());
~BNO08x();
bool initialize();
bool hard_reset();
bool soft_reset();
BNO08xResetReason get_reset_reason();
bool mode_sleep();
bool mode_on();
float q_to_float(int16_t fixed_point_value, uint8_t q_point);
bool run_full_calibration_routine();
void calibrate_all();
void calibrate_accelerometer();
void calibrate_gyro();
void calibrate_magnetometer();
void calibrate_planar_accelerometer();
void request_calibration_status();
bool calibration_complete();
void end_calibration();
void save_calibration();
void enable_rotation_vector(uint32_t time_between_reports);
void enable_game_rotation_vector(uint32_t time_between_reports);
void enable_ARVR_stabilized_rotation_vector(uint32_t time_between_reports);
void enable_ARVR_stabilized_game_rotation_vector(uint32_t time_between_reports);
void enable_gyro_integrated_rotation_vector(uint32_t time_between_reports);
void enable_uncalibrated_gyro(uint32_t time_between_reports);
void enable_calibrated_gyro(uint32_t time_between_reports);
void enable_accelerometer(uint32_t time_between_reports);
void enable_linear_accelerometer(uint32_t time_between_reports);
void enable_gravity(uint32_t time_between_reports);
void enable_magnetometer(uint32_t time_between_reports);
void enable_tap_detector(uint32_t time_between_reports);
void enable_step_counter(uint32_t time_between_reports);
void enable_stability_classifier(uint32_t time_between_reports);
void enable_activity_classifier(uint32_t time_between_reports, BNO08xActivityEnable activities_to_enable, uint8_t (&activity_confidence_vals)[9]);
void enable_raw_mems_gyro(uint32_t time_between_reports);
void enable_raw_mems_accelerometer(uint32_t time_between_reports);
void enable_raw_mems_magnetometer(uint32_t time_between_reports);
void disable_rotation_vector();
void disable_game_rotation_vector();
void disable_ARVR_stabilized_rotation_vector();
void disable_ARVR_stabilized_game_rotation_vector();
void disable_gyro_integrated_rotation_vector();
void disable_accelerometer();
void disable_linear_accelerometer();
void disable_gravity();
void disable_calibrated_gyro();
void disable_uncalibrated_gyro();
void disable_magnetometer();
void disable_step_counter();
void disable_stability_classifier();
void disable_activity_classifier();
void disable_tap_detector();
void disable_raw_mems_accelerometer();
void disable_raw_mems_gyro();
void disable_raw_mems_magnetometer();
void tare_now(uint8_t axis_sel = TARE_AXIS_ALL, uint8_t rotation_vector_basis = TARE_ROTATION_VECTOR);
void save_tare();
void clear_tare();
bool data_available(bool ignore_no_reports_enabled = false);
void register_cb(std::function<void()> cb_fxn);
void reset_all_data_to_defaults();
uint32_t get_time_stamp();
void get_magf(float& x, float& y, float& z, BNO08xAccuracy& accuracy);
float get_magf_X();
float get_magf_Y();
float get_magf_Z();
BNO08xAccuracy get_magf_accuracy();
void get_gravity(float& x, float& y, float& z, BNO08xAccuracy& accuracy);
float get_gravity_X();
float get_gravity_Y();
float get_gravity_Z();
BNO08xAccuracy get_gravity_accuracy();
float get_roll();
float get_pitch();
float get_yaw();
float get_roll_deg();
float get_pitch_deg();
float get_yaw_deg();
void get_quat(float& i, float& j, float& k, float& real, float& rad_accuracy, BNO08xAccuracy& accuracy);
float get_quat_I();
float get_quat_J();
float get_quat_K();
float get_quat_real();
float get_quat_radian_accuracy();
BNO08xAccuracy get_quat_accuracy();
void get_accel(float& x, float& y, float& z, BNO08xAccuracy& accuracy);
float get_accel_X();
float get_accel_Y();
float get_accel_Z();
BNO08xAccuracy get_accel_accuracy();
void get_linear_accel(float& x, float& y, float& z, BNO08xAccuracy& accuracy);
float get_linear_accel_X();
float get_linear_accel_Y();
float get_linear_accel_Z();
BNO08xAccuracy get_linear_accel_accuracy();
void get_raw_mems_accel(uint16_t& x, uint16_t& y, uint16_t& z);
uint16_t get_raw_mems_accel_X();
uint16_t get_raw_mems_accel_Y();
uint16_t get_raw_mems_accel_Z();
void get_raw_mems_gyro(uint16_t& x, uint16_t& y, uint16_t& z);
uint16_t get_raw_mems_gyro_X();
uint16_t get_raw_mems_gyro_Y();
uint16_t get_raw_mems_gyro_Z();
void get_raw_mems_magf(uint16_t& x, uint16_t& y, uint16_t& z);
uint16_t get_raw_mems_magf_X();
uint16_t get_raw_mems_magf_Y();
uint16_t get_raw_mems_magf_Z();
void get_calibrated_gyro_velocity(float& x, float& y, float& z);
float get_calibrated_gyro_velocity_X();
float get_calibrated_gyro_velocity_Y();
float get_calibrated_gyro_velocity_Z();
void get_uncalibrated_gyro_velocity(float& x, float& y, float& z, float& bx, float& by, float& bz);
float get_uncalibrated_gyro_velocity_X();
float get_uncalibrated_gyro_velocity_Y();
float get_uncalibrated_gyro_velocity_Z();
float get_uncalibrated_gyro_bias_X();
float get_uncalibrated_gyro_bias_Y();
float get_uncalibrated_gyro_bias_Z();
void get_integrated_gyro_velocity(float& x, float& y, float& z);
float get_integrated_gyro_velocity_X();
float get_integrated_gyro_velocity_Y();
float get_integrated_gyro_velocity_Z();
uint8_t get_tap_detector();
uint16_t get_step_count();
BNO08xStability get_stability_classifier();
BNO08xActivity get_activity_classifier();
// Metadata functions
int16_t get_Q1(uint16_t record_ID);
int16_t get_Q2(uint16_t record_ID);
int16_t get_Q3(uint16_t record_ID);
float get_resolution(uint16_t record_ID);
float get_range(uint16_t record_ID);
uint32_t FRS_read_word(uint16_t record_ID, uint8_t word_number);
bool FRS_read_request(uint16_t record_ID, uint16_t read_offset, uint16_t block_size);
bool FRS_read_data(uint16_t record_ID, uint8_t start_location, uint8_t words_to_read);
// Record IDs from figure 29, page 29 reference manual
// These are used to read the metadata for each sensor type
static const constexpr uint16_t FRS_RECORD_ID_ACCELEROMETER =
0xE302U;
static const constexpr uint16_t FRS_RECORD_ID_GYROSCOPE_CALIBRATED =
0xE306U;
static const constexpr uint16_t FRS_RECORD_ID_MAGNETIC_FIELD_CALIBRATED =
0xE309U;
static const constexpr uint16_t FRS_RECORD_ID_ROTATION_VECTOR =
0xE30BU;
static const constexpr uint8_t TARE_AXIS_ALL = 0x07U;
static const constexpr uint8_t TARE_AXIS_Z = 0x04U;
// Which rotation vector to tare, BNO08x saves them seperately
static const constexpr uint8_t TARE_ROTATION_VECTOR = 0U;
static const constexpr uint8_t TARE_GAME_ROTATION_VECTOR = 1U;
static const constexpr uint8_t TARE_GEOMAGNETIC_ROTATION_VECTOR = 2U;
static const constexpr uint8_t TARE_GYRO_INTEGRATED_ROTATION_VECTOR = 3U;
static const constexpr uint8_t TARE_ARVR_STABILIZED_ROTATION_VECTOR = 4U;
static const constexpr uint8_t TARE_ARVR_STABILIZED_GAME_ROTATION_VECTOR = 5U;
static const constexpr int16_t ROTATION_VECTOR_Q1 = 14;
static const constexpr int16_t ROTATION_VECTOR_ACCURACY_Q1 = 12;
static const constexpr int16_t ACCELEROMETER_Q1 = 8;
static const constexpr int16_t LINEAR_ACCELEROMETER_Q1 = 8;
static const constexpr int16_t GYRO_Q1 = 9;
static const constexpr int16_t MAGNETOMETER_Q1 = 4;
static const constexpr int16_t ANGULAR_VELOCITY_Q1 = 10;
static const constexpr int16_t GRAVITY_Q1 = 8;
private:
enum channels_t
{
CHANNEL_COMMAND,
CHANNEL_EXECUTABLE,
CHANNEL_CONTROL,
CHANNEL_REPORTS,
CHANNEL_WAKE_REPORTS,
CHANNEL_GYRO
};
typedef struct bno08x_rx_packet_t
{
uint8_t header[4];
uint8_t body[300];
uint16_t length;
} bno08x_rx_packet_t;
typedef struct bno08x_tx_packet_t
{
uint8_t body[50];
uint16_t length;
} bno08x_tx_packet_t;
typedef struct bno08x_report_period_tracker_t
{
uint8_t report_ID;
uint32_t period;
} bno08x_report_period_tracker_t;
typedef struct bno08x_init_status_t
{
bool gpio_outputs;
bool gpio_inputs;
bool isr_service;
bool isr_handler;
uint8_t task_count;
bool data_proc_task;
bool spi_task;
bool spi_bus;
bool spi_device;
bno08x_init_status_t()
: gpio_outputs(false)
, gpio_inputs(false)
, isr_service(false)
, isr_handler(false)
, task_count(0)
, data_proc_task(false)
, spi_task(false)
, spi_bus(false)
, spi_device(false)
{
}
} bno08x_init_status_t;
esp_err_t init_config_args();
esp_err_t init_gpio();
esp_err_t init_gpio_inputs();
esp_err_t init_gpio_outputs();
esp_err_t init_hint_isr();
esp_err_t init_spi();
esp_err_t deinit_gpio();
esp_err_t deinit_gpio_inputs();
esp_err_t deinit_gpio_outputs();
esp_err_t deinit_hint_isr();
esp_err_t deinit_spi();
bool wait_for_rx_done();
bool wait_for_tx_done();
bool wait_for_data();
esp_err_t receive_packet();
esp_err_t receive_packet_header(bno08x_rx_packet_t* packet);
esp_err_t receive_packet_body(bno08x_rx_packet_t* packet);
void send_packet(bno08x_tx_packet_t* packet);
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);
void disable_report(uint8_t report_ID, const EventBits_t report_evt_grp_bit);
void queue_packet(uint8_t channel_number, uint8_t data_length, uint8_t* commands);
void queue_command(uint8_t command, uint8_t* commands);
void queue_feature_command(uint8_t report_ID, uint32_t time_between_reports, uint32_t specific_config = 0);
void queue_calibrate_command(uint8_t _to_calibrate);
void queue_tare_command(uint8_t command, uint8_t axis = TARE_AXIS_ALL, uint8_t rotation_vector_basis = TARE_ROTATION_VECTOR);
void queue_request_product_id_command();
// functions to parse packets received from bno08x
uint16_t parse_packet(bno08x_rx_packet_t* packet, bool& notify_users);
uint16_t parse_product_id_report(bno08x_rx_packet_t* packet);
uint16_t parse_frs_read_response_report(bno08x_rx_packet_t* packet);
uint16_t parse_feature_get_response_report(bno08x_rx_packet_t* packet);
uint16_t parse_input_report(bno08x_rx_packet_t* packet);
void parse_input_report_data(bno08x_rx_packet_t* packet, uint16_t* data, uint16_t data_length);
uint16_t parse_gyro_integrated_rotation_vector_report(bno08x_rx_packet_t* packet);
uint16_t parse_command_report(bno08x_rx_packet_t* packet);
// functions to update data returned to user
void update_accelerometer_data(uint16_t* data, uint8_t status);
void update_lin_accelerometer_data(uint16_t* data, uint8_t status);
void update_calibrated_gyro_data(uint16_t* data, uint8_t status);
void update_uncalibrated_gyro_data(uint16_t* data, uint8_t status);
void update_magf_data(uint16_t* data, uint8_t status);
void update_gravity_data(uint16_t* data, uint8_t status);
void update_rotation_vector_data(uint16_t* data, uint8_t status);
void update_step_counter_data(uint16_t* data);
void update_raw_accelerometer_data(uint16_t* data);
void update_raw_gyro_data(uint16_t* data);
void update_raw_magf_data(uint16_t* data);
void update_tap_detector_data(bno08x_rx_packet_t* packet);
void update_stability_classifier_data(bno08x_rx_packet_t* packet);
void update_personal_activity_classifier_data(bno08x_rx_packet_t* packet);
void update_command_data(bno08x_rx_packet_t* packet);
void update_integrated_gyro_rotation_vector_data(bno08x_rx_packet_t* packet);
// for debug
void print_header(bno08x_rx_packet_t* packet);
void print_packet(bno08x_rx_packet_t* packet);
bool first_boot = true;
// spi task
TaskHandle_t spi_task_hdl;
static void spi_task_trampoline(void* arg);
void spi_task();
// data processing task
TaskHandle_t data_proc_task_hdl;
static void data_proc_task_trampoline(void* arg);
void data_proc_task();
// task control
SemaphoreHandle_t sem_kill_tasks;
esp_err_t launch_tasks();
esp_err_t kill_all_tasks();
void update_report_period_trackers(uint8_t report_ID, uint32_t new_period);
static uint8_t report_ID_to_report_period_tracker_idx(uint8_t report_ID);
EventGroupHandle_t
evt_grp_spi;
EventGroupHandle_t evt_grp_report_en;
EventGroupHandle_t evt_grp_task_flow;
QueueHandle_t queue_rx_data;
QueueHandle_t queue_tx_data;
QueueHandle_t queue_frs_read_data;
QueueHandle_t queue_reset_reason;
std::vector<std::function<void()>> cb_list; // Vector for storing any call-back functions added with register_cb()
uint32_t meta_data[9];
bno08x_config_t imu_config{};
spi_bus_config_t bus_config{};
spi_device_interface_config_t imu_spi_config{};
spi_device_handle_t spi_hdl{};
spi_transaction_t spi_transaction{};
bno08x_init_status_t
init_status;
// These are the raw sensor values (without Q applied) pulled from the user requested Input Report
uint32_t time_stamp;
uint16_t raw_accel_X, raw_accel_Y, raw_accel_Z,
accel_accuracy;
uint16_t raw_lin_accel_X, raw_lin_accel_Y, raw_lin_accel_Z,
accel_lin_accuracy;
uint16_t raw_calib_gyro_X, raw_calib_gyro_Y, raw_calib_gyro_Z;
uint16_t raw_quat_I, raw_quat_J, raw_quat_K, raw_quat_real, raw_quat_radian_accuracy,
quat_accuracy;
uint16_t integrated_gyro_velocity_X, integrated_gyro_velocity_Y,
integrated_gyro_velocity_Z;
uint16_t gravity_X, gravity_Y, gravity_Z,
gravity_accuracy;
uint16_t raw_uncalib_gyro_X, raw_uncalib_gyro_Y, raw_uncalib_gyro_Z, raw_bias_X, raw_bias_Y,
raw_bias_Z;
uint16_t raw_magf_X, raw_magf_Y, raw_magf_Z,
magf_accuracy;
uint8_t tap_detector;
uint16_t step_count;
uint8_t stability_classifier;
uint8_t activity_classifier;
uint8_t* activity_confidences = nullptr;
uint8_t calibration_status;
uint16_t mems_raw_accel_X, mems_raw_accel_Y,
mems_raw_accel_Z;
uint16_t mems_raw_gyro_X, mems_raw_gyro_Y,
mems_raw_gyro_Z;
uint16_t mems_raw_magf_X, mems_raw_magf_Y,
mems_raw_magf_Z;
static void IRAM_ATTR hint_handler(void* arg);
static const constexpr uint8_t TASK_CNT = 2U;
static const constexpr uint16_t RX_DATA_LENGTH = 300U;
static const constexpr uint16_t MAX_METADATA_LENGTH = 9U;
static const constexpr TickType_t HOST_INT_TIMEOUT_DEFAULT_MS =
3000UL /
portTICK_PERIOD_MS;
static const constexpr TickType_t HARD_RESET_DELAY_MS =
100UL /
portTICK_PERIOD_MS;
static const constexpr TickType_t CMD_EXECUTION_DELAY_MS =
10UL /
portTICK_PERIOD_MS;
static const constexpr uint32_t SCLK_MAX_SPEED = 3000000UL;
// evt_grp_spi bits
static const constexpr EventBits_t EVT_GRP_SPI_RX_DONE_BIT =
(1U << 0U);
static const constexpr EventBits_t EVT_GRP_SPI_RX_VALID_PACKET_BIT =
(1U << 1U);
static const constexpr EventBits_t EVT_GRP_SPI_RX_INVALID_PACKET_BIT =
(1U << 2U);
static const constexpr EventBits_t EVT_GRP_SPI_TX_DONE_BIT = (1 << 3);
// evt_grp_report_en bits
static const constexpr EventBits_t EVT_GRP_RPT_ROTATION_VECTOR_BIT = (1 << 0);
static const constexpr EventBits_t EVT_GRP_RPT_GAME_ROTATION_VECTOR_BIT = (1 << 1);
static const constexpr EventBits_t EVT_GRP_RPT_ARVR_S_ROTATION_VECTOR_BIT =
(1U << 2U);
static const constexpr EventBits_t EVT_GRP_RPT_ARVR_S_GAME_ROTATION_VECTOR_BIT =
(1U << 3U);
static const constexpr EventBits_t EVT_GRP_RPT_GYRO_ROTATION_VECTOR_BIT =
(1U << 4U);
static const constexpr EventBits_t EVT_GRP_RPT_ACCELEROMETER_BIT = (1U << 5U);
static const constexpr EventBits_t EVT_GRP_RPT_LINEAR_ACCELEROMETER_BIT = (1U << 6U);
static const constexpr EventBits_t EVT_GRP_RPT_GRAVITY_BIT = (1U << 7U);
static const constexpr EventBits_t EVT_GRP_RPT_GYRO_BIT = (1U << 8U);
static const constexpr EventBits_t EVT_GRP_RPT_GYRO_UNCALIBRATED_BIT = (1U << 9U);
static const constexpr EventBits_t EVT_GRP_RPT_MAGNETOMETER_BIT = (1U << 10U);
static const constexpr EventBits_t EVT_GRP_RPT_TAP_DETECTOR_BIT = (1U << 11U);
static const constexpr EventBits_t EVT_GRP_RPT_STEP_COUNTER_BIT = (1U << 12U);
static const constexpr EventBits_t EVT_GRP_RPT_STABILITY_CLASSIFIER_BIT = (1U << 13U);
static const constexpr EventBits_t EVT_GRP_RPT_ACTIVITY_CLASSIFIER_BIT = (1U << 14U);
static const constexpr EventBits_t EVT_GRP_RPT_RAW_ACCELEROMETER_BIT = (1U << 15U);
static const constexpr EventBits_t EVT_GRP_RPT_RAW_GYRO_BIT = (1U << 16U);
static const constexpr EventBits_t EVT_GRP_RPT_RAW_MAGNETOMETER_BIT = (1U << 17U);
// evt_grp_task_flow bits
static const constexpr EventBits_t EVT_GRP_TSK_FLW_RUNNING_BIT =
(1U << 0U);
static const constexpr EventBits_t EVT_GRP_RPT_ALL_BITS =
EVT_GRP_RPT_ROTATION_VECTOR_BIT | EVT_GRP_RPT_GAME_ROTATION_VECTOR_BIT | EVT_GRP_RPT_ARVR_S_ROTATION_VECTOR_BIT |
EVT_GRP_RPT_ARVR_S_GAME_ROTATION_VECTOR_BIT | EVT_GRP_RPT_GYRO_ROTATION_VECTOR_BIT | EVT_GRP_RPT_ACCELEROMETER_BIT |
EVT_GRP_RPT_LINEAR_ACCELEROMETER_BIT | EVT_GRP_RPT_GRAVITY_BIT | EVT_GRP_RPT_GYRO_BIT | EVT_GRP_RPT_GYRO_UNCALIBRATED_BIT |
EVT_GRP_RPT_MAGNETOMETER_BIT | EVT_GRP_RPT_TAP_DETECTOR_BIT | EVT_GRP_RPT_STEP_COUNTER_BIT | EVT_GRP_RPT_STABILITY_CLASSIFIER_BIT |
EVT_GRP_RPT_ACTIVITY_CLASSIFIER_BIT | EVT_GRP_RPT_RAW_ACCELEROMETER_BIT | EVT_GRP_RPT_RAW_GYRO_BIT | EVT_GRP_RPT_RAW_MAGNETOMETER_BIT;
// Higher level calibration commands, used by queue_calibrate_command
static const constexpr uint8_t CALIBRATE_ACCEL = 0U;
static const constexpr uint8_t CALIBRATE_GYRO = 1U;
static const constexpr uint8_t CALIBRATE_MAG = 2U;
static const constexpr uint8_t CALIBRATE_PLANAR_ACCEL = 3U;
static const constexpr uint8_t CALIBRATE_ACCEL_GYRO_MAG =
4U;
static const constexpr uint8_t CALIBRATE_STOP = 5U;
// Command IDs (see Ref. Manual 6.4)
static const constexpr uint8_t COMMAND_ERRORS = 1U;
static const constexpr uint8_t COMMAND_COUNTER = 2U;
static const constexpr uint8_t COMMAND_TARE = 3U;
static const constexpr uint8_t COMMAND_INITIALIZE = 4U;
static const constexpr uint8_t COMMAND_DCD = 6U;
static const constexpr uint8_t COMMAND_ME_CALIBRATE = 7U;
static const constexpr uint8_t COMMAND_DCD_PERIOD_SAVE = 9U;
static const constexpr uint8_t COMMAND_OSCILLATOR = 10U;
static const constexpr uint8_t COMMAND_CLEAR_DCD = 11U;
// SHTP channel 2 control report IDs, used in communication with sensor (See Ref. Manual 6.2)
static const constexpr uint8_t SHTP_REPORT_COMMAND_RESPONSE = 0xF1U;
static const constexpr uint8_t SHTP_REPORT_COMMAND_REQUEST = 0xF2U;
static const constexpr uint8_t SHTP_REPORT_FRS_READ_RESPONSE = 0xF3U;
static const constexpr uint8_t SHTP_REPORT_FRS_READ_REQUEST = 0xF4U;
static const constexpr uint8_t SHTP_REPORT_PRODUCT_ID_RESPONSE = 0xF8U;
static const constexpr uint8_t SHTP_REPORT_PRODUCT_ID_REQUEST = 0xF9U;
static const constexpr uint8_t SHTP_REPORT_BASE_TIMESTAMP = 0xFBU;
static const constexpr uint8_t SHTP_REPORT_SET_FEATURE_COMMAND = 0xFDU;
static const constexpr uint8_t SHTP_REPORT_GET_FEATURE_RESPONSE = 0xFCU;
// Sensor report IDs, used when enabling and reading BNO08x reports
static const constexpr uint8_t SENSOR_REPORT_ID_ACCELEROMETER = 0x01U;
static const constexpr uint8_t SENSOR_REPORT_ID_GYROSCOPE = 0x02U;
static const constexpr uint8_t SENSOR_REPORT_ID_MAGNETIC_FIELD = 0x03U;
static const constexpr uint8_t SENSOR_REPORT_ID_LINEAR_ACCELERATION = 0x04U;
static const constexpr uint8_t SENSOR_REPORT_ID_ROTATION_VECTOR = 0x05U;
static const constexpr uint8_t SENSOR_REPORT_ID_GRAVITY = 0x06U;
static const constexpr uint8_t SENSOR_REPORT_ID_UNCALIBRATED_GYRO = 0x07U;
static const constexpr uint8_t SENSOR_REPORT_ID_GAME_ROTATION_VECTOR = 0x08U;
static const constexpr uint8_t SENSOR_REPORT_ID_GEOMAGNETIC_ROTATION_VECTOR = 0x09U;
static const constexpr uint8_t SENSOR_REPORT_ID_GYRO_INTEGRATED_ROTATION_VECTOR = 0x2AU;
static const constexpr uint8_t SENSOR_REPORT_ID_TAP_DETECTOR = 0x10U;
static const constexpr uint8_t SENSOR_REPORT_ID_STEP_COUNTER = 0x11U;
static const constexpr uint8_t SENSOR_REPORT_ID_STABILITY_CLASSIFIER = 0x13U;
static const constexpr uint8_t SENSOR_REPORT_ID_RAW_ACCELEROMETER = 0x14U;
static const constexpr uint8_t SENSOR_REPORT_ID_RAW_GYROSCOPE = 0x15U;
static const constexpr uint8_t SENSOR_REPORT_ID_RAW_MAGNETOMETER = 0x16U;
static const constexpr uint8_t SENSOR_REPORT_ID_PERSONAL_ACTIVITY_CLASSIFIER = 0x1EU;
static const constexpr uint8_t SENSOR_REPORT_ID_ARVR_STABILIZED_ROTATION_VECTOR = 0x28U;
static const constexpr uint8_t SENSOR_REPORT_ID_ARVR_STABILIZED_GAME_ROTATION_VECTOR = 0x29U;
// Tare commands used by queue_tare_command
static const constexpr uint8_t TARE_NOW = 0U;
static const constexpr uint8_t TARE_PERSIST = 1U;
static const constexpr uint8_t TARE_SET_REORIENTATION = 2U;
static const constexpr uint8_t REPORT_CNT = 19;
bno08x_report_period_tracker_t report_period_trackers[REPORT_CNT] = {{SENSOR_REPORT_ID_ACCELEROMETER, 0}, {SENSOR_REPORT_ID_GYROSCOPE, 0},
{SENSOR_REPORT_ID_MAGNETIC_FIELD, 0}, {SENSOR_REPORT_ID_LINEAR_ACCELERATION, 0}, {SENSOR_REPORT_ID_ROTATION_VECTOR, 0},
{SENSOR_REPORT_ID_GRAVITY, 0}, {SENSOR_REPORT_ID_UNCALIBRATED_GYRO, 0}, {SENSOR_REPORT_ID_GAME_ROTATION_VECTOR, 0},
{SENSOR_REPORT_ID_GEOMAGNETIC_ROTATION_VECTOR, 0}, {SENSOR_REPORT_ID_GYRO_INTEGRATED_ROTATION_VECTOR, 0},
{SENSOR_REPORT_ID_TAP_DETECTOR, 0}, {SENSOR_REPORT_ID_STEP_COUNTER, 0}, {SENSOR_REPORT_ID_STABILITY_CLASSIFIER, 0},
{SENSOR_REPORT_ID_RAW_ACCELEROMETER, 0}, {SENSOR_REPORT_ID_RAW_GYROSCOPE, 0}, {SENSOR_REPORT_ID_RAW_MAGNETOMETER, 0},
{SENSOR_REPORT_ID_PERSONAL_ACTIVITY_CLASSIFIER, 0}, {SENSOR_REPORT_ID_ARVR_STABILIZED_ROTATION_VECTOR, 0},
{SENSOR_REPORT_ID_ARVR_STABILIZED_GAME_ROTATION_VECTOR,
0}};
uint32_t largest_sample_period_us =
0;
uint8_t current_slowest_report_ID;
TickType_t host_int_timeout_ms =
HOST_INT_TIMEOUT_DEFAULT_MS;
static const constexpr char* TAG = "BNO08x";
friend class BNO08xTestHelper; // allow test helper to access private members for unit tests
};
BNO08x_global_types.hpp
BNO08xStability
BNO08xStability
BNO08xStability states returned from get_stability_classifier()
Definition BNO08x_global_types.hpp:65
bno08x_config_t
struct bno08x_config_t bno08x_config_t
IMU configuration settings passed into constructor.
BNO08xResetReason
BNO08xResetReason
Reason for previous IMU reset (returned by get_reset_reason())
Definition BNO08x_global_types.hpp:23
BNO08xActivity
BNO08xActivity
BNO08xActivity states returned from get_activity_classifier()
Definition BNO08x_global_types.hpp:50
BNO08xActivityEnable
BNO08xActivityEnable
BNO08xActivity Classifier enable bits passed to enable_activity_classifier()
Definition BNO08x_global_types.hpp:35
BNO08xAccuracy
BNO08xAccuracy
Sensor accuracy returned during sensor calibration.
Definition BNO08x_global_types.hpp:13
BNO08x
BNO08x IMU driver class.
Definition BNO08x.hpp:34
BNO08x::parse_input_report_data
void parse_input_report_data(bno08x_rx_packet_t *packet, uint16_t *data, uint16_t data_length)
Parses data from received input report.
Definition BNO08x.cpp:1891
BNO08x::integrated_gyro_velocity_Y
uint16_t integrated_gyro_velocity_Y
Definition BNO08x.hpp:399
BNO08x::disable_report
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.
Definition BNO08x.cpp:1050
BNO08x::SHTP_REPORT_PRODUCT_ID_RESPONSE
static const constexpr uint8_t SHTP_REPORT_PRODUCT_ID_RESPONSE
See SH2 Ref. Manual 6.3.2.
Definition BNO08x.hpp:509
BNO08x::enable_gravity
void enable_gravity(uint32_t time_between_reports)
Sends command to enable gravity reading reports (See Ref. Manual 6.5.11)
Definition BNO08x.cpp:2300
BNO08x::SCLK_MAX_SPEED
static const constexpr uint32_t SCLK_MAX_SPEED
Max SPI SCLK speed BNO08x is capable of.
Definition BNO08x.hpp:439
BNO08x::raw_quat_radian_accuracy
uint16_t raw_quat_radian_accuracy
Definition BNO08x.hpp:397
BNO08x::enable_activity_classifier
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)
Definition BNO08x.cpp:2379
BNO08x::SENSOR_REPORT_ID_RAW_GYROSCOPE
static const constexpr uint8_t SENSOR_REPORT_ID_RAW_GYROSCOPE
See SH2 Ref. Manual 6.5.12.
Definition BNO08x.hpp:530
BNO08x::update_personal_activity_classifier_data
void update_personal_activity_classifier_data(bno08x_rx_packet_t *packet)
Updates activity classifier data from parsed input report.
Definition BNO08x.cpp:2170
BNO08x::ACCELEROMETER_Q1
static const constexpr int16_t ACCELEROMETER_Q1
Acceleration Q point (See SH-2 Ref. Manual 6.5.9)
Definition BNO08x.hpp:220
BNO08x::print_packet
void print_packet(bno08x_rx_packet_t *packet)
Prints the passed SHTP packet to serial console with ESP_LOG statement.
Definition BNO08x.cpp:3565
BNO08x::SENSOR_REPORT_ID_MAGNETIC_FIELD
static const constexpr uint8_t SENSOR_REPORT_ID_MAGNETIC_FIELD
See SH2 Ref. Manual 6.5.16.
Definition BNO08x.hpp:518
BNO08x::get_gravity
void get_gravity(float &x, float &y, float &z, BNO08xAccuracy &accuracy)
Get full reported gravity vector, units in m/s^2.
Definition BNO08x.cpp:2806
BNO08x::register_cb
void register_cb(std::function< void()> cb_fxn)
Registers a callback to execute when new data from a report is received.
Definition BNO08x.cpp:1493
BNO08x::launch_tasks
esp_err_t launch_tasks()
Launches spi_task and data_proc_task on constructor call.
Definition BNO08x.cpp:4003
BNO08x::raw_bias_Z
uint16_t raw_bias_Z
Uncalibrated gyro reading (See SH-2 Ref. Manual 6.5.14)
Definition BNO08x.hpp:404
BNO08x::FRS_RECORD_ID_MAGNETIC_FIELD_CALIBRATED
static const constexpr uint16_t FRS_RECORD_ID_MAGNETIC_FIELD_CALIBRATED
Calibrated magnetometer record ID, to be passed in metadata functions like get_Q1()
Definition BNO08x.hpp:202
BNO08x::COMMAND_TARE
static const constexpr uint8_t COMMAND_TARE
Command and response to tare command (See Sh2 Ref. Manual 6.4.4)
Definition BNO08x.hpp:496
BNO08x::get_accel_Z
float get_accel_Z()
Get z axis acceleration (total acceleration of device, units in m/s^2).
Definition BNO08x.cpp:3097
BNO08x::data_proc_task_trampoline
static void data_proc_task_trampoline(void *arg)
Static function used to launch data processing task.
Definition BNO08x.cpp:3940
BNO08x::ROTATION_VECTOR_Q1
static const constexpr int16_t ROTATION_VECTOR_Q1
Rotation vector Q point (See SH-2 Ref. Manual 6.5.18)
Definition BNO08x.hpp:218
BNO08x::spi_task_trampoline
static void spi_task_trampoline(void *arg)
Static function used to launch spi task.
Definition BNO08x.cpp:3874
BNO08x::update_report_period_trackers
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 ac...
Definition BNO08x.cpp:4101
BNO08x::EVT_GRP_RPT_GAME_ROTATION_VECTOR_BIT
static const constexpr EventBits_t EVT_GRP_RPT_GAME_ROTATION_VECTOR_BIT
When set, game rotation vector reports are active.
Definition BNO08x.hpp:452
BNO08x::get_range
float get_range(uint16_t record_ID)
Gets range from BNO08x FRS (flash record system).
Definition BNO08x.cpp:3676
BNO08x::get_linear_accel_Y
float get_linear_accel_Y()
Get y axis linear acceleration (acceleration of device minus gravity, units in m/s^2)
Definition BNO08x.cpp:3145
BNO08x::get_magf_X
float get_magf_X()
Get X component of magnetic field vector.
Definition BNO08x.cpp:2758
BNO08x::TARE_PERSIST
static const constexpr uint8_t TARE_PERSIST
See SH2 Ref. Manual 6.4.4.2.
Definition BNO08x.hpp:538
BNO08x::tap_detector
uint8_t tap_detector
Tap detector reading (See SH-2 Ref. Manual 6.5.27)
Definition BNO08x.hpp:407
BNO08x::get_quat_I
float get_quat_I()
Get I component of reported quaternion.
Definition BNO08x.cpp:2994
BNO08x::get_Q3
int16_t get_Q3(uint16_t record_ID)
Gets Q3 point from BNO08x FRS (flash record system).
Definition BNO08x.cpp:3646
BNO08x::get_calibrated_gyro_velocity_Z
float get_calibrated_gyro_velocity_Z()
Get calibrated gyro z axis angular velocity measurement.
Definition BNO08x.cpp:3349
BNO08x::EVT_GRP_SPI_RX_INVALID_PACKET_BIT
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.
Definition BNO08x.hpp:446
BNO08x::disable_tap_detector
void disable_tap_detector()
Sends command to disable tap detector reports by setting report interval to 0.
Definition BNO08x.cpp:2534
BNO08x::mode_sleep
bool mode_sleep()
Puts BNO08x sensor into sleep/low power mode using executable channel.
Definition BNO08x.cpp:886
BNO08x::EVT_GRP_RPT_ACCELEROMETER_BIT
static const constexpr EventBits_t EVT_GRP_RPT_ACCELEROMETER_BIT
When set, accelerometer reports are active.
Definition BNO08x.hpp:459
BNO08x::EVT_GRP_RPT_ROTATION_VECTOR_BIT
static const constexpr EventBits_t EVT_GRP_RPT_ROTATION_VECTOR_BIT
When set, rotation vector reports are active.
Definition BNO08x.hpp:451
BNO08x::RX_DATA_LENGTH
static const constexpr uint16_t RX_DATA_LENGTH
length buffer containing data received over spi
Definition BNO08x.hpp:424
BNO08x::stability_classifier
uint8_t stability_classifier
BNO08xStability status reading (See SH-2 Ref. Manual 6.5.31)
Definition BNO08x.hpp:409
BNO08x::get_pitch
float get_pitch()
Get the reported rotation about y axis.
Definition BNO08x.cpp:2886
BNO08x::parse_packet
uint16_t parse_packet(bno08x_rx_packet_t *packet, bool &notify_users)
Parses a packet received from bno08x, updating any data according to received reports.
Definition BNO08x.cpp:1507
BNO08x::calibrate_planar_accelerometer
void calibrate_planar_accelerometer()
Sends command to calibrate planar accelerometer.
Definition BNO08x.cpp:1236
BNO08x::SHTP_REPORT_SET_FEATURE_COMMAND
static const constexpr uint8_t SHTP_REPORT_SET_FEATURE_COMMAND
See SH2 Ref. Manual 6.5.4.
Definition BNO08x.hpp:512
BNO08x::get_resolution
float get_resolution(uint16_t record_ID)
Gets resolution from BNO08x FRS (flash record system).
Definition BNO08x.cpp:3659
BNO08x::SHTP_REPORT_COMMAND_RESPONSE
static const constexpr uint8_t SHTP_REPORT_COMMAND_RESPONSE
See SH2 Ref. Manual 6.3.9.
Definition BNO08x.hpp:505
BNO08x::disable_rotation_vector
void disable_rotation_vector()
Sends command to disable rotation vector reports by setting report interval to 0.
Definition BNO08x.cpp:2424
BNO08x::TARE_AXIS_ALL
static const constexpr uint8_t TARE_AXIS_ALL
Tare all axes (used with tare now command)
Definition BNO08x.hpp:207
BNO08x::deinit_gpio_inputs
esp_err_t deinit_gpio_inputs()
Deinitializes GPIO inputs, called from deconstructor.
Definition BNO08x.cpp:453
BNO08x::bno08x_init_status_t
struct BNO08x::bno08x_init_status_t bno08x_init_status_t
Holds info about which functionality has been successfully initialized (used by deconstructor during ...
BNO08x::parse_feature_get_response_report
uint16_t parse_feature_get_response_report(bno08x_rx_packet_t *packet)
Parses get feature request report received from BNO08x.
Definition BNO08x.cpp:1683
BNO08x::SENSOR_REPORT_ID_GYROSCOPE
static const constexpr uint8_t SENSOR_REPORT_ID_GYROSCOPE
See SH2 Ref. Manual 6.5.13.
Definition BNO08x.hpp:517
BNO08x::TARE_GEOMAGNETIC_ROTATION_VECTOR
static const constexpr uint8_t TARE_GEOMAGNETIC_ROTATION_VECTOR
tare geomagnetic rotation vector
Definition BNO08x.hpp:213
BNO08x::deinit_spi
esp_err_t deinit_spi()
Deinitializes SPI.
Definition BNO08x.cpp:562
BNO08x::get_stability_classifier
BNO08xStability get_stability_classifier()
Get the current stability classifier (Seee Ref. Manual 6.5.31)
Definition BNO08x.cpp:3508
BNO08x::enable_accelerometer
void enable_accelerometer(uint32_t time_between_reports)
Sends command to enable accelerometer reports (See Ref. Manual 6.5.9)
Definition BNO08x.cpp:2278
BNO08x::report_ID_to_report_period_tracker_idx
static uint8_t report_ID_to_report_period_tracker_idx(uint8_t report_ID)
Converts report id to respective index in report_period_trackers.
Definition BNO08x.cpp:4155
BNO08x::TARE_NOW
static const constexpr uint8_t TARE_NOW
See SH2 Ref. Manual 6.4.4.1.
Definition BNO08x.hpp:537
BNO08x::FRS_read_word
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....
Definition BNO08x.cpp:3697
BNO08x::q_to_float
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....
Definition BNO08x.cpp:2648
BNO08x::wait_for_rx_done
bool wait_for_rx_done()
Waits for data to be received over SPI, or host_int_timeout_ms to elapse.
Definition BNO08x.cpp:608
BNO08x::hard_reset
bool hard_reset()
Hard resets BNO08x sensor.
Definition BNO08x.cpp:737
BNO08x::parse_product_id_report
uint16_t parse_product_id_report(bno08x_rx_packet_t *packet)
Parses product id report and prints device info.
Definition BNO08x.cpp:1616
BNO08x::SENSOR_REPORT_ID_STEP_COUNTER
static const constexpr uint8_t SENSOR_REPORT_ID_STEP_COUNTER
See SH2 Ref. Manual 6.5.29.
Definition BNO08x.hpp:527
BNO08x::MAX_METADATA_LENGTH
static const constexpr uint16_t MAX_METADATA_LENGTH
max length of metadata used in frs read operations
Definition BNO08x.hpp:425
BNO08x::send_packet
void send_packet(bno08x_tx_packet_t *packet)
Sends a queued SHTP packet via SPI.
Definition BNO08x.cpp:1127
BNO08x::TAG
static const constexpr char * TAG
Class tag used for serial print statements.
Definition BNO08x.hpp:560
BNO08x::get_uncalibrated_gyro_velocity_Y
float get_uncalibrated_gyro_velocity_Y()
Get uncalibrated gyro Y axis angular velocity measurement.
Definition BNO08x.cpp:3392
BNO08x::get_magf_accuracy
BNO08xAccuracy get_magf_accuracy()
Get accuracy of reported magnetic field vector.
Definition BNO08x.cpp:2791
BNO08x::get_integrated_gyro_velocity_X
float get_integrated_gyro_velocity_X()
Get x axis angular velocity from gyro-integrated rotation vector. (See Ref. Manual 6....
Definition BNO08x.cpp:3458
BNO08x::spi_task
void spi_task()
Task responsible for SPI transactions. Executed when HINT in is asserted by BNO08x.
Definition BNO08x.cpp:3885
BNO08x::COMMAND_OSCILLATOR
static const constexpr uint8_t COMMAND_OSCILLATOR
Retrieve oscillator type command (See SH2 Ref. Manual 6.4)
Definition BNO08x.hpp:501
BNO08x::COMMAND_INITIALIZE
static const constexpr uint8_t COMMAND_INITIALIZE
Reinitialize sensor hub components See (SH2 Ref. Manual 6.4.5)
Definition BNO08x.hpp:497
BNO08x::EVT_GRP_SPI_RX_DONE_BIT
static const constexpr EventBits_t EVT_GRP_SPI_RX_DONE_BIT
When this bit is set it indicates a receive procedure has completed.
Definition BNO08x.hpp:442
BNO08x::accel_accuracy
uint16_t accel_accuracy
Raw acceleration readings (See SH-2 Ref. Manual 6.5.8)
Definition BNO08x.hpp:393
BNO08x::get_raw_mems_magf_X
uint16_t get_raw_mems_magf_X()
Get raw magnetometer x axis reading from physical magnetometer sensor (See Ref. Manual 6....
Definition BNO08x.cpp:3283
BNO08x::SENSOR_REPORT_ID_ACCELEROMETER
static const constexpr uint8_t SENSOR_REPORT_ID_ACCELEROMETER
See SH2 Ref. Manual 6.5.9.
Definition BNO08x.hpp:516
BNO08x::update_stability_classifier_data
void update_stability_classifier_data(bno08x_rx_packet_t *packet)
Updates stability classifier data from parsed input report.
Definition BNO08x.cpp:2158
BNO08x::print_header
void print_header(bno08x_rx_packet_t *packet)
Prints the header of the passed SHTP packet to serial console with ESP_LOG statement.
Definition BNO08x.cpp:3538
BNO08x::FRS_RECORD_ID_GYROSCOPE_CALIBRATED
static const constexpr uint16_t FRS_RECORD_ID_GYROSCOPE_CALIBRATED
Calirated gyroscope record ID, to be passed in metadata functions like get_Q1()
Definition BNO08x.hpp:200
BNO08x::accel_lin_accuracy
uint16_t accel_lin_accuracy
Raw linear acceleration (See SH-2 Ref. Manual 6.5.10)
Definition BNO08x.hpp:395
BNO08x::quat_accuracy
uint16_t quat_accuracy
Raw quaternion reading (See SH-2 Ref. Manual 6.5.44)
Definition BNO08x.hpp:398
BNO08x::SENSOR_REPORT_ID_ROTATION_VECTOR
static const constexpr uint8_t SENSOR_REPORT_ID_ROTATION_VECTOR
See SH2 Ref. Manual 6.5.18.
Definition BNO08x.hpp:520
BNO08x::COMMAND_ERRORS
static const constexpr uint8_t COMMAND_ERRORS
Definition BNO08x.hpp:494
BNO08x::CMD_EXECUTION_DELAY_MS
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 ena...
Definition BNO08x.hpp:435
BNO08x::bno08x_tx_packet_t
struct BNO08x::bno08x_tx_packet_t bno08x_tx_packet_t
Holds data that is sent over spi.
BNO08x::EVT_GRP_RPT_GYRO_BIT
static const constexpr EventBits_t EVT_GRP_RPT_GYRO_BIT
When set, gyro reports are active.
Definition BNO08x.hpp:462
BNO08x::update_magf_data
void update_magf_data(uint16_t *data, uint8_t status)
Updates magnetic field data from parsed input report.
Definition BNO08x.cpp:2040
BNO08x::enable_magnetometer
void enable_magnetometer(uint32_t time_between_reports)
Sends command to enable magnetometer reports (See Ref. Manual 6.5.16)
Definition BNO08x.cpp:2333
BNO08x::get_accel
void get_accel(float &x, float &y, float &z, BNO08xAccuracy &accuracy)
Get full acceleration (total acceleration of device, units in m/s^2).
Definition BNO08x.cpp:3064
BNO08x::mems_raw_gyro_X
uint16_t mems_raw_gyro_X
Definition BNO08x.hpp:415
BNO08x::EVT_GRP_RPT_RAW_ACCELEROMETER_BIT
static const constexpr EventBits_t EVT_GRP_RPT_RAW_ACCELEROMETER_BIT
When set, raw accelerometer reports are active.
Definition BNO08x.hpp:469
BNO08x::FRS_read_data
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...
Definition BNO08x.cpp:3749
BNO08x::bno08x_rx_packet_t
struct BNO08x::bno08x_rx_packet_t bno08x_rx_packet_t
Holds data that is received over spi.
BNO08x::imu_spi_config
spi_device_interface_config_t imu_spi_config
SPI slave device settings.
Definition BNO08x.hpp:384
BNO08x::disable_step_counter
void disable_step_counter()
Sends command to disable step counter reports by setting report interval to 0.
Definition BNO08x.cpp:2544
BNO08x::get_Q1
int16_t get_Q1(uint16_t record_ID)
Gets Q1 point from BNO08x FRS (flash record system).
Definition BNO08x.cpp:3616
BNO08x::init_status
bno08x_init_status_t init_status
Initialization status of various functionality, used by deconstructor during cleanup,...
Definition BNO08x.hpp:388
BNO08x::reset_all_data_to_defaults
void reset_all_data_to_defaults()
Resets all data returned by public getter APIs to initial values of 0 and low accuracy.
Definition BNO08x.cpp:2670
BNO08x::tare_now
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)
Definition BNO08x.cpp:2608
BNO08x::get_tap_detector
uint8_t get_tap_detector()
Get if tap has occured.
Definition BNO08x.cpp:3488
BNO08x::flush_rx_packets
void flush_rx_packets(uint8_t flush_count)
Definition BNO08x.cpp:1144
BNO08x::get_calibrated_gyro_velocity_Y
float get_calibrated_gyro_velocity_Y()
Get calibrated gyro y axis angular velocity measurement.
Definition BNO08x.cpp:3339
BNO08x::get_activity_classifier
BNO08xActivity get_activity_classifier()
Get the current activity classifier (Seee Ref. Manual 6.5.36)
Definition BNO08x.cpp:3527
BNO08x::get_raw_mems_gyro_Y
uint16_t get_raw_mems_gyro_Y()
Get raw gyroscope y axis reading from physical gyroscope MEMs sensor (See Ref. Manual 6....
Definition BNO08x.cpp:3247
BNO08x::get_linear_accel
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).
Definition BNO08x.cpp:3122
BNO08x::queue_tare_command
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....
Definition BNO08x.cpp:3851
BNO08x::queue_tx_data
QueueHandle_t queue_tx_data
Packet queue used to send data to be sent over SPI from sending functions to spi_task.
Definition BNO08x.hpp:374
BNO08x::disable_calibrated_gyro
void disable_calibrated_gyro()
Sends command to disable calibrated gyro reports by setting report interval to 0.
Definition BNO08x.cpp:2504
BNO08x::deinit_gpio
esp_err_t deinit_gpio()
Deinitializes GPIO, called from deconstructor.
Definition BNO08x.cpp:427
BNO08x::wait_for_data
bool wait_for_data()
Waits for a valid or invalid packet to be received or host_int_timeout_ms to elapse.
Definition BNO08x.cpp:648
BNO08x::COMMAND_CLEAR_DCD
static const constexpr uint8_t COMMAND_CLEAR_DCD
Clear DCD & Reset command (See SH2 Ref. Manual 6.4)
Definition BNO08x.hpp:502
BNO08x::parse_command_report
uint16_t parse_command_report(bno08x_rx_packet_t *packet)
Parses received command report sent by BNO08x (See Ref. Manual 6.3.9)
Definition BNO08x.cpp:1943
BNO08x::disable_activity_classifier
void disable_activity_classifier()
Sends command to disable activity classifier reports by setting report interval to 0.
Definition BNO08x.cpp:2564
BNO08x::get_uncalibrated_gyro_bias_Z
float get_uncalibrated_gyro_bias_Z()
Get uncalibrated gyro Z axis drift estimate.
Definition BNO08x.cpp:3432
BNO08x::parse_frs_read_response_report
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.
Definition BNO08x.cpp:1663
BNO08x::EVT_GRP_RPT_GYRO_ROTATION_VECTOR_BIT
static const constexpr EventBits_t EVT_GRP_RPT_GYRO_ROTATION_VECTOR_BIT
When set, gyro integrator rotation vector reports are active.
Definition BNO08x.hpp:457
BNO08x::SHTP_REPORT_PRODUCT_ID_REQUEST
static const constexpr uint8_t SHTP_REPORT_PRODUCT_ID_REQUEST
See SH2 Ref. Manual 6.3.1.
Definition BNO08x.hpp:510
BNO08x::TASK_CNT
static const constexpr uint8_t TASK_CNT
Total amount of tasks utilized by BNO08x driver library.
Definition BNO08x.hpp:422
BNO08x::get_gravity_Z
float get_gravity_Z()
Get the reported z axis gravity.
Definition BNO08x.cpp:2839
BNO08x::enable_ARVR_stabilized_game_rotation_vector
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....
Definition BNO08x.cpp:2256
BNO08x::CALIBRATE_STOP
static const constexpr uint8_t CALIBRATE_STOP
Stop calibration command used by queue_calibrate_command.
Definition BNO08x.hpp:491
BNO08x::init_config_args
esp_err_t init_config_args()
Initializes required esp-idf SPI data structures with values from user passed bno08x_config_t struct.
Definition BNO08x.cpp:124
BNO08x::init_spi
esp_err_t init_spi()
Initializes SPI.
Definition BNO08x.cpp:372
BNO08x::mems_raw_accel_Z
uint16_t mems_raw_accel_Z
Raw accelerometer readings from MEMS sensor (See SH2 Ref. Manual 6.5.8)
Definition BNO08x.hpp:414
BNO08x::TARE_SET_REORIENTATION
static const constexpr uint8_t TARE_SET_REORIENTATION
See SH2 Ref. Manual 6.4.4.3.
Definition BNO08x.hpp:539
BNO08x::enable_step_counter
void enable_step_counter(uint32_t time_between_reports)
Sends command to enable step counter reports (See Ref. Manual 6.5.29)
Definition BNO08x.cpp:2355
BNO08x::get_quat_real
float get_quat_real()
Get real component of reported quaternion.
Definition BNO08x.cpp:3027
BNO08x::kill_all_tasks
esp_err_t kill_all_tasks()
Deletes spi_task and data_proc_task safely on deconstructor call.
Definition BNO08x.cpp:4055
BNO08x::queue_command
void queue_command(uint8_t command, uint8_t *commands)
Queues a packet containing a command.
Definition BNO08x.cpp:1158
BNO08x::disable_raw_mems_gyro
void disable_raw_mems_gyro()
Sends command to disable raw gyro reports by setting report interval to 0.
Definition BNO08x.cpp:2585
BNO08x::disable_gravity
void disable_gravity()
Sends command to disable gravity reports by setting report interval to 0.
Definition BNO08x.cpp:2494
BNO08x::EVT_GRP_TSK_FLW_RUNNING_BIT
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.
Definition BNO08x.hpp:474
BNO08x::get_linear_accel_accuracy
BNO08xAccuracy get_linear_accel_accuracy()
Get accuracy of linear acceleration.
Definition BNO08x.cpp:3165
BNO08x::spi_task_hdl
TaskHandle_t spi_task_hdl
spi_task() handle
Definition BNO08x.hpp:351
BNO08x::raw_quat_J
uint16_t raw_quat_J
Definition BNO08x.hpp:397
BNO08x::get_quat_radian_accuracy
float get_quat_radian_accuracy()
Get radian accuracy of reported quaternion.
Definition BNO08x.cpp:3038
BNO08x::queue_packet
void queue_packet(uint8_t channel_number, uint8_t data_length, uint8_t *commands)
Queues an SHTP packet to be sent via SPI.
Definition BNO08x.cpp:1098
BNO08x::disable_raw_mems_magnetometer
void disable_raw_mems_magnetometer()
Sends command to disable raw magnetometer reports by setting report interval to 0.
Definition BNO08x.cpp:2595
BNO08x::evt_grp_report_en
EventGroupHandle_t evt_grp_report_en
Event group for indicating which reports are currently enabled.
Definition BNO08x.hpp:370
BNO08x::get_yaw
float get_yaw()
Get the reported rotation about z axis.
Definition BNO08x.cpp:2915
BNO08x::integrated_gyro_velocity_X
uint16_t integrated_gyro_velocity_X
Definition BNO08x.hpp:399
BNO08x::EVT_GRP_RPT_TAP_DETECTOR_BIT
static const constexpr EventBits_t EVT_GRP_RPT_TAP_DETECTOR_BIT
When set, tap detector reports are active.
Definition BNO08x.hpp:465
BNO08x::disable_magnetometer
void disable_magnetometer()
Sends command to disable magnetometer reports by setting report interval to 0.
Definition BNO08x.cpp:2524
BNO08x::raw_calib_gyro_Y
uint16_t raw_calib_gyro_Y
Definition BNO08x.hpp:396
BNO08x::SENSOR_REPORT_ID_GRAVITY
static const constexpr uint8_t SENSOR_REPORT_ID_GRAVITY
See SH2 Ref. Manual 6.5.11.
Definition BNO08x.hpp:521
BNO08x::~BNO08x
~BNO08x()
BNO08x imu deconstructor.
Definition BNO08x.cpp:34
BNO08x::TARE_ARVR_STABILIZED_GAME_ROTATION_VECTOR
static const constexpr uint8_t TARE_ARVR_STABILIZED_GAME_ROTATION_VECTOR
Tare ARVR stabilized game rotation vector.
Definition BNO08x.hpp:216
BNO08x::enable_raw_mems_magnetometer
void enable_raw_mems_magnetometer(uint32_t time_between_reports)
Sends command to enable raw MEMs magnetometer reports (See Ref. Manual 6.5.15)
Definition BNO08x.cpp:2414
BNO08x::raw_quat_I
uint16_t raw_quat_I
Definition BNO08x.hpp:397
BNO08x::enable_raw_mems_accelerometer
void enable_raw_mems_accelerometer(uint32_t time_between_reports)
Sends command to enable raw MEMs accelerometer reports (See Ref. Manual 6.5.8)
Definition BNO08x.cpp:2392
BNO08x::cb_list
std::vector< std::function< void()> > cb_list
Definition BNO08x.hpp:378
BNO08x::EVT_GRP_RPT_RAW_GYRO_BIT
static const constexpr EventBits_t EVT_GRP_RPT_RAW_GYRO_BIT
When set, raw gyro reports are active.
Definition BNO08x.hpp:470
BNO08x::disable_raw_mems_accelerometer
void disable_raw_mems_accelerometer()
Sends command to disable raw accelerometer reports by setting report interval to 0.
Definition BNO08x.cpp:2575
BNO08x::update_raw_magf_data
void update_raw_magf_data(uint16_t *data)
Updates raw magnetic field data from parsed input report.
Definition BNO08x.cpp:2132
BNO08x::get_accel_accuracy
BNO08xAccuracy get_accel_accuracy()
Get accuracy of linear acceleration.
Definition BNO08x.cpp:3107
BNO08x::get_roll_deg
float get_roll_deg()
Get the reported rotation about x axis.
Definition BNO08x.cpp:2942
BNO08x::get_uncalibrated_gyro_velocity_X
float get_uncalibrated_gyro_velocity_X()
Get uncalibrated gyro x axis angular velocity measurement.
Definition BNO08x.cpp:3382
BNO08x::calibration_complete
bool calibration_complete()
Returns true if calibration has completed.
Definition BNO08x.cpp:1314
BNO08x::SENSOR_REPORT_ID_PERSONAL_ACTIVITY_CLASSIFIER
static const constexpr uint8_t SENSOR_REPORT_ID_PERSONAL_ACTIVITY_CLASSIFIER
See SH2 Ref. Manual 6.5.36.
Definition BNO08x.hpp:532
BNO08x::enable_gyro_integrated_rotation_vector
void enable_gyro_integrated_rotation_vector(uint32_t time_between_reports)
Sends command to enable gyro integrated rotation vector reports (See Ref. Manual 6....
Definition BNO08x.cpp:2267
BNO08x::update_lin_accelerometer_data
void update_lin_accelerometer_data(uint16_t *data, uint8_t status)
Updates linear accelerometer data from parsed input report.
Definition BNO08x.cpp:1991
BNO08x::get_uncalibrated_gyro_bias_Y
float get_uncalibrated_gyro_bias_Y()
Get uncalibrated gyro Y axis drift estimate.
Definition BNO08x.cpp:3422
BNO08x::SHTP_REPORT_FRS_READ_REQUEST
static const constexpr uint8_t SHTP_REPORT_FRS_READ_REQUEST
See SH2 Ref. Manual 6.3.6.
Definition BNO08x.hpp:508
BNO08x::activity_classifier
uint8_t activity_classifier
BNO08xActivity status reading (See SH-2 Ref. Manual 6.5.36)
Definition BNO08x.hpp:410
BNO08x::raw_accel_X
uint16_t raw_accel_X
Definition BNO08x.hpp:392
BNO08x::get_linear_accel_X
float get_linear_accel_X()
Get x axis linear acceleration (acceleration of device minus gravity, units in m/s^2)
Definition BNO08x.cpp:3135
BNO08x::disable_game_rotation_vector
void disable_game_rotation_vector()
Sends command to disable game rotation vector reports by setting report interval to 0.
Definition BNO08x.cpp:2434
BNO08x::get_calibrated_gyro_velocity_X
float get_calibrated_gyro_velocity_X()
Get calibrated gyro x axis angular velocity measurement.
Definition BNO08x.cpp:3329
BNO08x::raw_quat_K
uint16_t raw_quat_K
Definition BNO08x.hpp:397
BNO08x::get_gravity_accuracy
BNO08xAccuracy get_gravity_accuracy()
Get the reported gravity accuracy.
Definition BNO08x.cpp:2849
BNO08x::get_raw_mems_magf_Z
uint16_t get_raw_mems_magf_Z()
Get raw magnetometer z axis reading from physical magnetometer sensor (See Ref. Manual 6....
Definition BNO08x.cpp:3303
BNO08x::enable_report
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.
Definition BNO08x.cpp:1016
BNO08x::EVT_GRP_RPT_ARVR_S_GAME_ROTATION_VECTOR_BIT
static const constexpr EventBits_t EVT_GRP_RPT_ARVR_S_GAME_ROTATION_VECTOR_BIT
When set, ARVR stabilized game rotation vector reports are active.
Definition BNO08x.hpp:455
BNO08x::COMMAND_DCD_PERIOD_SAVE
static const constexpr uint8_t COMMAND_DCD_PERIOD_SAVE
Configure DCD periodic saving (See SH2 Ref. Manual 6.4)
Definition BNO08x.hpp:500
BNO08x::meta_data
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....
Definition BNO08x.hpp:380
BNO08x::parse_gyro_integrated_rotation_vector_report
uint16_t parse_gyro_integrated_rotation_vector_report(bno08x_rx_packet_t *packet)
Parses received gyro integrated rotation vector report sent by BNO08x.
Definition BNO08x.cpp:1930
BNO08x::get_quat_accuracy
BNO08xAccuracy get_quat_accuracy()
Get accuracy of reported quaternion.
Definition BNO08x.cpp:3049
BNO08x::wait_for_tx_done
bool wait_for_tx_done()
Waits for a queued packet to be sent or host_int_timeout_ms to elapse.
Definition BNO08x.cpp:704
BNO08x::queue_rx_data
QueueHandle_t queue_rx_data
Packet queue used to send data received from bno08x from spi_task to data_proc_task.
Definition BNO08x.hpp:373
BNO08x::EVT_GRP_RPT_STABILITY_CLASSIFIER_BIT
static const constexpr EventBits_t EVT_GRP_RPT_STABILITY_CLASSIFIER_BIT
When set, stability classifier reports are active.
Definition BNO08x.hpp:467
BNO08x::enable_uncalibrated_gyro
void enable_uncalibrated_gyro(uint32_t time_between_reports)
Sends command to enable uncalibrated gyro reports (See Ref. Manual 6.5.14)
Definition BNO08x.cpp:2322
BNO08x::largest_sample_period_us
uint32_t largest_sample_period_us
Current largest sample period of any enabled report in microseconds (used to determine timeout for hi...
Definition BNO08x.hpp:553
BNO08x::hint_handler
static void IRAM_ATTR hint_handler(void *arg)
HINT interrupt service routine, handles falling edge of BNO08x HINT pin.
Definition BNO08x.cpp:4209
BNO08x::SENSOR_REPORT_ID_RAW_ACCELEROMETER
static const constexpr uint8_t SENSOR_REPORT_ID_RAW_ACCELEROMETER
See SH2 Ref. Manual 6.5.8.
Definition BNO08x.hpp:529
BNO08x::SENSOR_REPORT_ID_TAP_DETECTOR
static const constexpr uint8_t SENSOR_REPORT_ID_TAP_DETECTOR
See SH2 Ref. Manual 6.5.27.
Definition BNO08x.hpp:526
BNO08x::get_magf_Y
float get_magf_Y()
Get Y component of magnetic field vector.
Definition BNO08x.cpp:2769
BNO08x::COMMAND_ME_CALIBRATE
static const constexpr uint8_t COMMAND_ME_CALIBRATE
Command and response to configure ME calibration (See SH2 Ref. Manual 6.4.7)
Definition BNO08x.hpp:499
BNO08x::update_raw_accelerometer_data
void update_raw_accelerometer_data(uint16_t *data)
Updates raw accelerometer data from parsed input report.
Definition BNO08x.cpp:2104
BNO08x::queue_reset_reason
QueueHandle_t queue_reset_reason
Queue used to send reset reason from product id report to reset_reason() function.
Definition BNO08x.hpp:376
BNO08x::get_raw_mems_accel_Z
uint16_t get_raw_mems_accel_Z()
Get raw accelerometer z axis reading from physical accelerometer MEMs sensor (See Ref....
Definition BNO08x.cpp:3211
BNO08x::raw_quat_real
uint16_t raw_quat_real
Definition BNO08x.hpp:397
BNO08x::get_raw_mems_accel_X
uint16_t get_raw_mems_accel_X()
Get raw accelerometer x axis reading from physical accelerometer MEMs sensor (See Ref....
Definition BNO08x.cpp:3191
BNO08x::get_uncalibrated_gyro_velocity
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 giv...
Definition BNO08x.cpp:3367
BNO08x::raw_calib_gyro_X
uint16_t raw_calib_gyro_X
Definition BNO08x.hpp:396
BNO08x::get_gravity_X
float get_gravity_X()
Get the reported x axis gravity.
Definition BNO08x.cpp:2819
BNO08x::get_raw_mems_gyro_X
uint16_t get_raw_mems_gyro_X()
Get raw gyroscope x axis reading from physical gyroscope MEMs sensor (See Ref. Manual 6....
Definition BNO08x.cpp:3237
BNO08x::EVT_GRP_RPT_ALL_BITS
static const constexpr EventBits_t EVT_GRP_RPT_ALL_BITS
Definition BNO08x.hpp:477
BNO08x::get_roll
float get_roll()
Get the reported rotation about x axis.
Definition BNO08x.cpp:2859
BNO08x::raw_bias_X
uint16_t raw_bias_X
Definition BNO08x.hpp:403
BNO08x::get_gravity_Y
float get_gravity_Y()
Get the reported y axis gravity.
Definition BNO08x.cpp:2829
BNO08x::enable_ARVR_stabilized_rotation_vector
void enable_ARVR_stabilized_rotation_vector(uint32_t time_between_reports)
Sends command to enable ARVR stabilized rotation vector reports (See Ref. Manual 6....
Definition BNO08x.cpp:2245
BNO08x::enable_raw_mems_gyro
void enable_raw_mems_gyro(uint32_t time_between_reports)
Sends command to enable raw MEMs gyro reports (See Ref. Manual 6.5.12)
Definition BNO08x.cpp:2403
BNO08x::SENSOR_REPORT_ID_ARVR_STABILIZED_ROTATION_VECTOR
static const constexpr uint8_t SENSOR_REPORT_ID_ARVR_STABILIZED_ROTATION_VECTOR
See SH2 Ref. Manual 6.5.42.
Definition BNO08x.hpp:533
BNO08x::parse_input_report
uint16_t parse_input_report(bno08x_rx_packet_t *packet)
Parses received input report sent by BNO08x.
Definition BNO08x.cpp:1794
BNO08x::receive_packet
esp_err_t receive_packet()
Receives a SHTP packet via SPI and sends it to data_proc_task()
Definition BNO08x.cpp:906
BNO08x::update_uncalibrated_gyro_data
void update_uncalibrated_gyro_data(uint16_t *data, uint8_t status)
Updates uncalibrated gyro data from parsed input report.
Definition BNO08x.cpp:2022
BNO08x::TARE_ROTATION_VECTOR
static const constexpr uint8_t TARE_ROTATION_VECTOR
Tare rotation vector.
Definition BNO08x.hpp:211
BNO08x::init_gpio_inputs
esp_err_t init_gpio_inputs()
Initializes required gpio inputs.
Definition BNO08x.cpp:220
BNO08x::get_integrated_gyro_velocity
void get_integrated_gyro_velocity(float &x, float &y, float &z)
Full rotational velocity from gyro-integrated rotation vector (See Ref. Manual 6.5....
Definition BNO08x.cpp:3446
BNO08x::EVT_GRP_RPT_MAGNETOMETER_BIT
static const constexpr EventBits_t EVT_GRP_RPT_MAGNETOMETER_BIT
When set, magnetometer reports are active.
Definition BNO08x.hpp:464
BNO08x::mems_raw_magf_Z
uint16_t mems_raw_magf_Z
Raw magnetometer (compass) readings from MEMS sensor (See SH-2 Ref. Manual 6.5.15)
Definition BNO08x.hpp:418
BNO08x::ROTATION_VECTOR_ACCURACY_Q1
static const constexpr int16_t ROTATION_VECTOR_ACCURACY_Q1
Rotation vector accuracy estimate Q point (See SH-2 Ref. Manual 6.5.18)
Definition BNO08x.hpp:219
BNO08x::get_raw_mems_magf
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....
Definition BNO08x.cpp:3271
BNO08x::mems_raw_accel_X
uint16_t mems_raw_accel_X
Definition BNO08x.hpp:413
BNO08x::COMMAND_COUNTER
static const constexpr uint8_t COMMAND_COUNTER
Definition BNO08x.hpp:495
BNO08x::get_Q2
int16_t get_Q2(uint16_t record_ID)
Gets Q2 point from BNO08x FRS (flash record system).
Definition BNO08x.cpp:3631
BNO08x::CALIBRATE_PLANAR_ACCEL
static const constexpr uint8_t CALIBRATE_PLANAR_ACCEL
Calibrate planar acceleration command used by queue_calibrate_command.
Definition BNO08x.hpp:488
BNO08x::update_calibrated_gyro_data
void update_calibrated_gyro_data(uint16_t *data, uint8_t status)
Updates linear gyro data from parsed input report.
Definition BNO08x.cpp:2007
BNO08x::EVT_GRP_SPI_RX_VALID_PACKET_BIT
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.
Definition BNO08x.hpp:444
BNO08x::REPORT_CNT
static const constexpr uint8_t REPORT_CNT
Total unique reports that can be returned by BNO08x.
Definition BNO08x.hpp:541
BNO08x::get_reset_reason
BNO08xResetReason get_reset_reason()
Requests product ID, prints the returned info over serial, and returns the reason for the most resent...
Definition BNO08x.cpp:826
BNO08x::EVT_GRP_RPT_ACTIVITY_CLASSIFIER_BIT
static const constexpr EventBits_t EVT_GRP_RPT_ACTIVITY_CLASSIFIER_BIT
When set, activity classifier reports are active.
Definition BNO08x.hpp:468
BNO08x::soft_reset
bool soft_reset()
Soft resets BNO08x sensor using executable channel.
Definition BNO08x.cpp:802
BNO08x::bus_config
spi_bus_config_t bus_config
SPI bus GPIO configuration settings.
Definition BNO08x.hpp:383
BNO08x::queue_frs_read_data
QueueHandle_t queue_frs_read_data
Queue used to send packet body from data_proc_task to frs read functions.
Definition BNO08x.hpp:375
BNO08x::calibrate_gyro
void calibrate_gyro()
Sends command to calibrate gyro.
Definition BNO08x.cpp:1212
BNO08x::deinit_hint_isr
esp_err_t deinit_hint_isr()
Deinitializes host interrupt ISR, called from deconstructor.
Definition BNO08x.cpp:526
BNO08x::enable_calibrated_gyro
void enable_calibrated_gyro(uint32_t time_between_reports)
Sends command to enable calibrated gyro reports (See Ref. Manual 6.5.13)
Definition BNO08x.cpp:2311
BNO08x::SENSOR_REPORT_ID_RAW_MAGNETOMETER
static const constexpr uint8_t SENSOR_REPORT_ID_RAW_MAGNETOMETER
See SH2 Ref. Manual 6.5.15.
Definition BNO08x.hpp:531
BNO08x::TARE_GYRO_INTEGRATED_ROTATION_VECTOR
static const constexpr uint8_t TARE_GYRO_INTEGRATED_ROTATION_VECTOR
Tare gyro integrated rotation vector.
Definition BNO08x.hpp:214
BNO08x::receive_packet_body
esp_err_t receive_packet_body(bno08x_rx_packet_t *packet)
Receives a SHTP packet body via SPI.
Definition BNO08x.cpp:987
BNO08x::FRS_RECORD_ID_ROTATION_VECTOR
static const constexpr uint16_t FRS_RECORD_ID_ROTATION_VECTOR
Rotation vector record ID, to be passed in metadata functions like get_Q1()
Definition BNO08x.hpp:204
BNO08x::get_quat_K
float get_quat_K()
Get K component of reported quaternion.
Definition BNO08x.cpp:3016
BNO08x::get_quat_J
float get_quat_J()
Get J component of reported quaternion.
Definition BNO08x.cpp:3005
BNO08x::MAGNETOMETER_Q1
static const constexpr int16_t MAGNETOMETER_Q1
Magnetometer Q point (See SH-2 Ref. Manual 6.5.16)
Definition BNO08x.hpp:223
BNO08x::HARD_RESET_DELAY_MS
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...
Definition BNO08x.hpp:431
BNO08x::save_calibration
void save_calibration()
Sends command to save internal calibration data (See Ref. Manual 6.4.7).
Definition BNO08x.cpp:1339
BNO08x::init_hint_isr
esp_err_t init_hint_isr()
Initializes host interrupt ISR.
Definition BNO08x.cpp:321
BNO08x::evt_grp_spi
EventGroupHandle_t evt_grp_spi
Event group for indicating when bno08x hint pin has triggered and when new data has been processed....
Definition BNO08x.hpp:369
BNO08x::update_rotation_vector_data
void update_rotation_vector_data(uint16_t *data, uint8_t status)
Updates roation vector data from parsed input report.
Definition BNO08x.cpp:2072
BNO08x::update_step_counter_data
void update_step_counter_data(uint16_t *data)
Updates step counter data from parsed input report.
Definition BNO08x.cpp:2092
BNO08x::GYRO_Q1
static const constexpr int16_t GYRO_Q1
Gyro Q point (See SH-2 Ref. Manual 6.5.13)
Definition BNO08x.hpp:222
BNO08x::disable_ARVR_stabilized_rotation_vector
void disable_ARVR_stabilized_rotation_vector()
Sends command to disable ARVR stabilized rotation vector reports by setting report interval to 0.
Definition BNO08x.cpp:2444
BNO08x::get_integrated_gyro_velocity_Z
float get_integrated_gyro_velocity_Z()
Get z axis angular velocity from gyro-integrated rotation vector. (See Ref. Manual 6....
Definition BNO08x.cpp:3478
BNO08x::raw_magf_X
uint16_t raw_magf_X
Definition BNO08x.hpp:405
BNO08x::get_raw_mems_accel
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....
Definition BNO08x.cpp:3179
BNO08x::get_calibrated_gyro_velocity
void get_calibrated_gyro_velocity(float &x, float &y, float &z)
Get full rotational velocity with drift compensation (units in Rad/s).
Definition BNO08x.cpp:3317
BNO08x::sem_kill_tasks
SemaphoreHandle_t sem_kill_tasks
semaphore to count amount of killed tasks
Definition BNO08x.hpp:361
BNO08x::EVT_GRP_RPT_ARVR_S_ROTATION_VECTOR_BIT
static const constexpr EventBits_t EVT_GRP_RPT_ARVR_S_ROTATION_VECTOR_BIT
When set, ARVR stabilized rotation vector reports are active.
Definition BNO08x.hpp:453
BNO08x::disable_gyro_integrated_rotation_vector
void disable_gyro_integrated_rotation_vector()
Sends command to disable gyro integrated rotation vector reports by setting report interval to 0.
Definition BNO08x.cpp:2464
BNO08x::mems_raw_magf_Y
uint16_t mems_raw_magf_Y
Definition BNO08x.hpp:417
BNO08x::disable_uncalibrated_gyro
void disable_uncalibrated_gyro()
Sends command to disable uncalibrated gyro reports by setting report interval to 0.
Definition BNO08x.cpp:2514
BNO08x::ANGULAR_VELOCITY_Q1
static const constexpr int16_t ANGULAR_VELOCITY_Q1
Angular velocity Q point (See SH-2 Ref. Manual 6.5.44)
Definition BNO08x.hpp:224
BNO08x::update_integrated_gyro_rotation_vector_data
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.
Definition BNO08x.cpp:2206
BNO08x::SHTP_REPORT_COMMAND_REQUEST
static const constexpr uint8_t SHTP_REPORT_COMMAND_REQUEST
See SH2 Ref. Manual 6.3.8.
Definition BNO08x.hpp:506
BNO08x::enable_stability_classifier
void enable_stability_classifier(uint32_t time_between_reports)
Sends command to enable activity stability classifier reports (See Ref. Manual 6.5....
Definition BNO08x.cpp:2366
BNO08x::host_int_timeout_ms
TickType_t host_int_timeout_ms
Max wait between HINT being asserted by BNO08x before transaction is considered failed (in milisecond...
Definition BNO08x.hpp:557
BNO08x::deinit_gpio_outputs
esp_err_t deinit_gpio_outputs()
Deinitializes GPIO outputs, called from deconstructor.
Definition BNO08x.cpp:475
BNO08x::disable_ARVR_stabilized_game_rotation_vector
void disable_ARVR_stabilized_game_rotation_vector()
Sends command to disable ARVR stabilized game rotation vector reports by setting report interval to 0...
Definition BNO08x.cpp:2454
BNO08x::EVT_GRP_RPT_STEP_COUNTER_BIT
static const constexpr EventBits_t EVT_GRP_RPT_STEP_COUNTER_BIT
When set, step counter reports are active.
Definition BNO08x.hpp:466
BNO08x::disable_stability_classifier
void disable_stability_classifier()
Sends command to disable stability reports by setting report interval to 0.
Definition BNO08x.cpp:2554
BNO08x::data_proc_task
void data_proc_task()
Task responsible parsing packets. Executed when SPI task sends a packet to be parsed,...
Definition BNO08x.cpp:3951
BNO08x::raw_magf_Z
uint16_t raw_magf_Z
Definition BNO08x.hpp:405
BNO08x::enable_rotation_vector
void enable_rotation_vector(uint32_t time_between_reports)
Sends command to enable rotation vector reports (See Ref. Manual 6.5.18)
Definition BNO08x.cpp:2234
BNO08x::get_magf_Z
float get_magf_Z()
Get Z component of magnetic field vector.
Definition BNO08x.cpp:2780
BNO08x::enable_tap_detector
void enable_tap_detector(uint32_t time_between_reports)
Sends command to enable tap detector reports (See Ref. Manual 6.5.27)
Definition BNO08x.cpp:2344
BNO08x::data_available
bool data_available(bool ignore_no_reports_enabled=false)
Checks if BNO08x has asserted interrupt and sent data.
Definition BNO08x.cpp:1469
BNO08x::raw_accel_Y
uint16_t raw_accel_Y
Definition BNO08x.hpp:392
BNO08x::mems_raw_magf_X
uint16_t mems_raw_magf_X
Definition BNO08x.hpp:417
BNO08x::SENSOR_REPORT_ID_STABILITY_CLASSIFIER
static const constexpr uint8_t SENSOR_REPORT_ID_STABILITY_CLASSIFIER
See SH2 Ref. Manual 6.5.31.
Definition BNO08x.hpp:528
BNO08x::queue_request_product_id_command
void queue_request_product_id_command()
Queues a packet containing the request product ID command.
Definition BNO08x.cpp:1174
BNO08x::mems_raw_gyro_Y
uint16_t mems_raw_gyro_Y
Definition BNO08x.hpp:415
BNO08x::get_uncalibrated_gyro_velocity_Z
float get_uncalibrated_gyro_velocity_Z()
Get uncalibrated gyro Z axis angular velocity measurement.
Definition BNO08x.cpp:3402
BNO08x::EVT_GRP_RPT_GRAVITY_BIT
static const constexpr EventBits_t EVT_GRP_RPT_GRAVITY_BIT
When set, gravity reports are active.
Definition BNO08x.hpp:461
BNO08x::TARE_GAME_ROTATION_VECTOR
static const constexpr uint8_t TARE_GAME_ROTATION_VECTOR
Tare game rotation vector.
Definition BNO08x.hpp:212
BNO08x::SENSOR_REPORT_ID_GEOMAGNETIC_ROTATION_VECTOR
static const constexpr uint8_t SENSOR_REPORT_ID_GEOMAGNETIC_ROTATION_VECTOR
See SH2 Ref. Manual 6.5.20.
Definition BNO08x.hpp:524
BNO08x::raw_lin_accel_Z
uint16_t raw_lin_accel_Z
Definition BNO08x.hpp:394
BNO08x::time_stamp
uint32_t time_stamp
Report timestamp (see datasheet 1.3.5.3)
Definition BNO08x.hpp:391
BNO08x::get_accel_X
float get_accel_X()
Get x axis acceleration (total acceleration of device, units in m/s^2).
Definition BNO08x.cpp:3077
BNO08x::enable_game_rotation_vector
void enable_game_rotation_vector(uint32_t time_between_reports)
Sends command to enable game rotation vector reports (See Ref. Manual 6.5.19)
Definition BNO08x.cpp:2223
BNO08x::TARE_ARVR_STABILIZED_ROTATION_VECTOR
static const constexpr uint8_t TARE_ARVR_STABILIZED_ROTATION_VECTOR
Tare ARVR stabilized rotation vector.
Definition BNO08x.hpp:215
BNO08x::CALIBRATE_MAG
static const constexpr uint8_t CALIBRATE_MAG
Calibrate magnetometer command used by queue_calibrate_command.
Definition BNO08x.hpp:487
BNO08x::channels_t
channels_t
SHTP protocol channels.
Definition BNO08x.hpp:230
BNO08x::CHANNEL_CONTROL
@ CHANNEL_CONTROL
Definition BNO08x.hpp:233
BNO08x::CHANNEL_EXECUTABLE
@ CHANNEL_EXECUTABLE
Definition BNO08x.hpp:232
BNO08x::CHANNEL_REPORTS
@ CHANNEL_REPORTS
Definition BNO08x.hpp:234
BNO08x::CHANNEL_COMMAND
@ CHANNEL_COMMAND
Definition BNO08x.hpp:231
BNO08x::CHANNEL_GYRO
@ CHANNEL_GYRO
Definition BNO08x.hpp:236
BNO08x::CHANNEL_WAKE_REPORTS
@ CHANNEL_WAKE_REPORTS
Definition BNO08x.hpp:235
BNO08x::spi_transaction
spi_transaction_t spi_transaction
SPI transaction handle.
Definition BNO08x.hpp:386
BNO08x::mode_on
bool mode_on()
Turns on/ brings BNO08x sensor out of sleep mode using executable channel.
Definition BNO08x.cpp:866
BNO08x::get_raw_mems_gyro
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....
Definition BNO08x.cpp:3225
BNO08x::calibrate_magnetometer
void calibrate_magnetometer()
Sends command to calibrate magnetometer.
Definition BNO08x.cpp:1224
BNO08x::EVT_GRP_RPT_RAW_MAGNETOMETER_BIT
static const constexpr EventBits_t EVT_GRP_RPT_RAW_MAGNETOMETER_BIT
When set, raw magnetometer reports are active.
Definition BNO08x.hpp:471
BNO08x::mems_raw_gyro_Z
uint16_t mems_raw_gyro_Z
Raw gyro readings from MEMS sensor (See SH-2 Ref. Manual 6.5.12)
Definition BNO08x.hpp:416
BNO08x::raw_bias_Y
uint16_t raw_bias_Y
Definition BNO08x.hpp:403
BNO08x::evt_grp_task_flow
EventGroupHandle_t evt_grp_task_flow
Event group for indicating when tasks should complete and self-delete (on deconstructor call)
Definition BNO08x.hpp:371
BNO08x::magf_accuracy
uint16_t magf_accuracy
Calibrated magnetic field reading in uTesla (See SH-2 Ref. Manual 6.5.16)
Definition BNO08x.hpp:406
BNO08x::update_tap_detector_data
void update_tap_detector_data(bno08x_rx_packet_t *packet)
Updates tap detector data from parsed input report.
Definition BNO08x.cpp:2146
BNO08x::end_calibration
void end_calibration()
Sends command to end calibration procedure.
Definition BNO08x.cpp:1327
BNO08x::receive_packet_header
esp_err_t receive_packet_header(bno08x_rx_packet_t *packet)
Receives a SHTP packet header via SPI.
Definition BNO08x.cpp:955
BNO08x::SENSOR_REPORT_ID_UNCALIBRATED_GYRO
static const constexpr uint8_t SENSOR_REPORT_ID_UNCALIBRATED_GYRO
See SH2 Ref. Manual 6.5.14.
Definition BNO08x.hpp:522
BNO08x::spi_hdl
spi_device_handle_t spi_hdl
SPI device handle.
Definition BNO08x.hpp:385
BNO08x::raw_uncalib_gyro_Y
uint16_t raw_uncalib_gyro_Y
Definition BNO08x.hpp:403
BNO08x::SENSOR_REPORT_ID_GYRO_INTEGRATED_ROTATION_VECTOR
static const constexpr uint8_t SENSOR_REPORT_ID_GYRO_INTEGRATED_ROTATION_VECTOR
See SH2 Ref. Manual 6.5.44.
Definition BNO08x.hpp:525
BNO08x::raw_magf_Y
uint16_t raw_magf_Y
Definition BNO08x.hpp:405
BNO08x::CALIBRATE_ACCEL
static const constexpr uint8_t CALIBRATE_ACCEL
Calibrate accelerometer command used by queue_calibrate_command.
Definition BNO08x.hpp:485
BNO08x::SENSOR_REPORT_ID_LINEAR_ACCELERATION
static const constexpr uint8_t SENSOR_REPORT_ID_LINEAR_ACCELERATION
See SH2 Ref. Manual 6.5.10.
Definition BNO08x.hpp:519
BNO08x::SHTP_REPORT_GET_FEATURE_RESPONSE
static const constexpr uint8_t SHTP_REPORT_GET_FEATURE_RESPONSE
See SH2 Ref. Manual 6.5.5.
Definition BNO08x.hpp:513
BNO08x::queue_calibrate_command
void queue_calibrate_command(uint8_t _to_calibrate)
Queues a packet containing a command to calibrate the specified sensor.
Definition BNO08x.cpp:1250
BNO08x::init_gpio_outputs
esp_err_t init_gpio_outputs()
Initializes required gpio outputs.
Definition BNO08x.cpp:255
BNO08x::LINEAR_ACCELEROMETER_Q1
static const constexpr int16_t LINEAR_ACCELEROMETER_Q1
Linear acceleration Q point (See SH-2 Ref. Manual 6.5.10)
Definition BNO08x.hpp:221
BNO08x::update_raw_gyro_data
void update_raw_gyro_data(uint16_t *data)
Updates raw gyro data from parsed input report.
Definition BNO08x.cpp:2118
BNO08x::integrated_gyro_velocity_Z
uint16_t integrated_gyro_velocity_Z
Raw gyro angular velocity reading from integrated gyro rotation vector (See SH-2 Ref....
Definition BNO08x.hpp:400
BNO08x::BNO08x
BNO08x(bno08x_config_t imu_config=bno08x_config_t())
BNO08x imu constructor.
Definition BNO08x.cpp:12
BNO08x::calibration_status
uint8_t calibration_status
Calibration status of device (See SH-2 Ref. Manual 6.4.7.1 & 6.4.7.2)
Definition BNO08x.hpp:412
BNO08x::get_uncalibrated_gyro_bias_X
float get_uncalibrated_gyro_bias_X()
Get uncalibrated gyro x axis drift estimate.
Definition BNO08x.cpp:3412
BNO08x::disable_accelerometer
void disable_accelerometer()
Sends command to disable accelerometer reports by setting report interval to 0.
Definition BNO08x.cpp:2474
BNO08x::update_gravity_data
void update_gravity_data(uint16_t *data, uint8_t status)
Updates gravity data from parsed input report.
Definition BNO08x.cpp:2056
BNO08x::FRS_RECORD_ID_ACCELEROMETER
static const constexpr uint16_t FRS_RECORD_ID_ACCELEROMETER
Accelerometer record ID, to be passed in metadata functions like get_Q1()
Definition BNO08x.hpp:198
BNO08x::step_count
uint16_t step_count
Step counter reading (See SH-2 Ref. Manual 6.5.29)
Definition BNO08x.hpp:408
BNO08x::mems_raw_accel_Y
uint16_t mems_raw_accel_Y
Definition BNO08x.hpp:413
BNO08x::get_raw_mems_magf_Y
uint16_t get_raw_mems_magf_Y()
Get raw magnetometer y axis reading from physical magnetometer sensor (See Ref. Manual 6....
Definition BNO08x.cpp:3293
BNO08x::get_time_stamp
uint32_t get_time_stamp()
Return timestamp of most recent report.
Definition BNO08x.cpp:2660
BNO08x::EVT_GRP_RPT_LINEAR_ACCELEROMETER_BIT
static const constexpr EventBits_t EVT_GRP_RPT_LINEAR_ACCELEROMETER_BIT
When set, linear accelerometer reports are active.
Definition BNO08x.hpp:460
BNO08x::SENSOR_REPORT_ID_GAME_ROTATION_VECTOR
static const constexpr uint8_t SENSOR_REPORT_ID_GAME_ROTATION_VECTOR
See SH2 Ref. Manual 6.5.19.
Definition BNO08x.hpp:523
BNO08x::get_step_count
uint16_t get_step_count()
Get the counted amount of steps.
Definition BNO08x.cpp:3498
BNO08x::EVT_GRP_SPI_TX_DONE_BIT
static const constexpr EventBits_t EVT_GRP_SPI_TX_DONE_BIT
When this bit is set, it indicates a queued packet has been sent.
Definition BNO08x.hpp:448
BNO08x::FRS_read_request
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 o...
Definition BNO08x.cpp:3719
BNO08x::gravity_accuracy
uint16_t gravity_accuracy
Gravity reading in m/s^2 (See SH-2 Ref. Manual 6.5.11)
Definition BNO08x.hpp:402
BNO08x::init_gpio
esp_err_t init_gpio()
Initializes required gpio.
Definition BNO08x.cpp:293
BNO08x::GRAVITY_Q1
static const constexpr int16_t GRAVITY_Q1
Gravity Q point (See SH-2 Ref. Manual 6.5.11)
Definition BNO08x.hpp:225
BNO08x::enable_linear_accelerometer
void enable_linear_accelerometer(uint32_t time_between_reports)
Sends command to enable linear accelerometer reports (See Ref. Manual 6.5.10)
Definition BNO08x.cpp:2289
BNO08x::raw_lin_accel_X
uint16_t raw_lin_accel_X
Definition BNO08x.hpp:394
BNO08x::current_slowest_report_ID
uint8_t current_slowest_report_ID
ID of the currently enabled report with the largest sample period.
Definition BNO08x.hpp:555
BNO08x::report_period_trackers
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).
Definition BNO08x.hpp:543
BNO08x::SHTP_REPORT_BASE_TIMESTAMP
static const constexpr uint8_t SHTP_REPORT_BASE_TIMESTAMP
See SH2 Ref. Manual 7.2.1.
Definition BNO08x.hpp:511
BNO08x::first_boot
bool first_boot
true only for first execution of hard_reset(), used to suppress the printing of product ID report.
Definition BNO08x.hpp:348
BNO08x::HOST_INT_TIMEOUT_DEFAULT_MS
static const constexpr TickType_t HOST_INT_TIMEOUT_DEFAULT_MS
Max wait between HINT being asserted by BNO08x before transaction is considered failed (in milisecond...
Definition BNO08x.hpp:427
BNO08x::get_raw_mems_gyro_Z
uint16_t get_raw_mems_gyro_Z()
Get raw gyroscope z axis reading from physical gyroscope MEMs sensor (See Ref. Manual 6....
Definition BNO08x.cpp:3257
BNO08x::run_full_calibration_routine
bool run_full_calibration_routine()
Runs full calibration routine.
Definition BNO08x.cpp:1358
BNO08x::get_magf
void get_magf(float &x, float &y, float &z, BNO08xAccuracy &accuracy)
Get the full magnetic field vector.
Definition BNO08x.cpp:2745
BNO08x::bno08x_report_period_tracker_t
struct BNO08x::bno08x_report_period_tracker_t bno08x_report_period_tracker_t
BNO08x::initialize
bool initialize()
Initializes BNO08x sensor.
Definition BNO08x.cpp:74
BNO08x::CALIBRATE_GYRO
static const constexpr uint8_t CALIBRATE_GYRO
Calibrate gyro command used by queue_calibrate_command.
Definition BNO08x.hpp:486
BNO08x::SENSOR_REPORT_ID_ARVR_STABILIZED_GAME_ROTATION_VECTOR
static const constexpr uint8_t SENSOR_REPORT_ID_ARVR_STABILIZED_GAME_ROTATION_VECTOR
See SH2 Ref. Manual 6.5.43.
Definition BNO08x.hpp:534
BNO08x::SHTP_REPORT_FRS_READ_RESPONSE
static const constexpr uint8_t SHTP_REPORT_FRS_READ_RESPONSE
See SH2 Ref. Manual 6.3.7.
Definition BNO08x.hpp:507
BNO08x::get_raw_mems_accel_Y
uint16_t get_raw_mems_accel_Y()
Get raw accelerometer y axis reading from physical accelerometer MEMs sensor (See Ref....
Definition BNO08x.cpp:3201
BNO08x::TARE_AXIS_Z
static const constexpr uint8_t TARE_AXIS_Z
Tar yaw axis only (used with tare now command)
Definition BNO08x.hpp:208
BNO08x::imu_config
bno08x_config_t imu_config
IMU configuration settings.
Definition BNO08x.hpp:382
BNO08x::calibrate_accelerometer
void calibrate_accelerometer()
Sends command to calibrate accelerometer.
Definition BNO08x.cpp:1200
BNO08x::COMMAND_DCD
static const constexpr uint8_t COMMAND_DCD
Save DCD command (See SH2 Ref. Manual 6.4.7)
Definition BNO08x.hpp:498
BNO08x::gravity_Y
uint16_t gravity_Y
Definition BNO08x.hpp:401
BNO08x::raw_accel_Z
uint16_t raw_accel_Z
Definition BNO08x.hpp:392
BNO08x::gravity_X
uint16_t gravity_X
Definition BNO08x.hpp:401
BNO08x::get_pitch_deg
float get_pitch_deg()
Get the reported rotation about y axis.
Definition BNO08x.cpp:2952
BNO08x::CALIBRATE_ACCEL_GYRO_MAG
static const constexpr uint8_t CALIBRATE_ACCEL_GYRO_MAG
Calibrate accelerometer, gyro, & magnetometer command used by queue_calibrate_command.
Definition BNO08x.hpp:489
BNO08x::raw_calib_gyro_Z
uint16_t raw_calib_gyro_Z
Raw gyro reading (See SH-2 Ref. Manual 6.5.13)
Definition BNO08x.hpp:396
BNO08x::get_quat
void get_quat(float &i, float &j, float &k, float &real, float &rad_accuracy, BNO08xAccuracy &accuracy)
Get the full quaternion reading.
Definition BNO08x.cpp:2979
BNO08x::queue_feature_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....
Definition BNO08x.cpp:3815
BNO08x::get_yaw_deg
float get_yaw_deg()
Get the reported rotation about z axis.
Definition BNO08x.cpp:2962
BNO08x::EVT_GRP_RPT_GYRO_UNCALIBRATED_BIT
static const constexpr EventBits_t EVT_GRP_RPT_GYRO_UNCALIBRATED_BIT
When set, uncalibrated gyro reports are active.
Definition BNO08x.hpp:463
BNO08x::activity_confidences
uint8_t * activity_confidences
Confidence of read activities (See SH-2 Ref. Manual 6.5.36)
Definition BNO08x.hpp:411
BNO08x::update_command_data
void update_command_data(bno08x_rx_packet_t *packet)
Updates command data from parsed input report.
Definition BNO08x.cpp:2188
BNO08x::data_proc_task_hdl
TaskHandle_t data_proc_task_hdl
data_proc_task() task handle
Definition BNO08x.hpp:356
BNO08x::gravity_Z
uint16_t gravity_Z
Definition BNO08x.hpp:401
BNO08x::raw_uncalib_gyro_Z
uint16_t raw_uncalib_gyro_Z
Definition BNO08x.hpp:403
BNO08x::save_tare
void save_tare()
Sends command to save tare into non-volatile memory of BNO08x (See Ref. Manual 6.4....
Definition BNO08x.cpp:2620
BNO08x::disable_linear_accelerometer
void disable_linear_accelerometer()
Sends command to disable linear accelerometer reports by setting report interval to 0.
Definition BNO08x.cpp:2484
BNO08x::calibrate_all
void calibrate_all()
Sends command to calibrate accelerometer, gyro, and magnetometer.
Definition BNO08x.cpp:1188
BNO08x::raw_uncalib_gyro_X
uint16_t raw_uncalib_gyro_X
Definition BNO08x.hpp:403
BNO08x::get_accel_Y
float get_accel_Y()
Get y axis acceleration (total acceleration of device, units in m/s^2).
Definition BNO08x.cpp:3087
BNO08x::get_linear_accel_Z
float get_linear_accel_Z()
Get z axis linear acceleration (acceleration of device minus gravity, units in m/s^2)
Definition BNO08x.cpp:3155
BNO08x::clear_tare
void clear_tare()
Sends command to clear persistent tare settings in non-volatile memory of BNO08x (See Ref....
Definition BNO08x.cpp:2632
BNO08x::update_accelerometer_data
void update_accelerometer_data(uint16_t *data, uint8_t status)
Updates accelerometer data from parsed input report.
Definition BNO08x.cpp:1975
BNO08x::raw_lin_accel_Y
uint16_t raw_lin_accel_Y
Definition BNO08x.hpp:394
BNO08x::get_integrated_gyro_velocity_Y
float get_integrated_gyro_velocity_Y()
Get y axis angular velocity from gyro-integrated rotation vector. (See Ref. Manual 6....
Definition BNO08x.cpp:3468
BNO08x::request_calibration_status
void request_calibration_status()
Requests ME calibration status from BNO08x (see Ref. Manual 6.4.7.2)
Definition BNO08x.cpp:1297
BNO08xTestHelper
BNO08x unit test helper class.
Definition BNO08xTestHelper.hpp:16
BNO08x::bno08x_init_status_t
Holds info about which functionality has been successfully initialized (used by deconstructor during ...
Definition BNO08x.hpp:262
BNO08x::bno08x_init_status_t::data_proc_task
bool data_proc_task
True if xTaskCreate has been called successfully for data_proc_task.
Definition BNO08x.hpp:268
BNO08x::bno08x_init_status_t::bno08x_init_status_t
bno08x_init_status_t()
Definition BNO08x.hpp:273
BNO08x::bno08x_init_status_t::isr_service
bool isr_service
True if global ISR service has been initialized.
Definition BNO08x.hpp:265
BNO08x::bno08x_init_status_t::task_count
uint8_t task_count
How many successfully initialized tasks (max of TSK_CNT)
Definition BNO08x.hpp:267
BNO08x::bno08x_init_status_t::gpio_inputs
bool gpio_inputs
True if GPIO inputs have been initialized.
Definition BNO08x.hpp:264
BNO08x::bno08x_init_status_t::gpio_outputs
bool gpio_outputs
True if GPIO outputs have been initialized.
Definition BNO08x.hpp:263
BNO08x::bno08x_init_status_t::spi_task
bool spi_task
True if xTaskCreate has been called successfully for spi_task.
Definition BNO08x.hpp:269
BNO08x::bno08x_init_status_t::spi_bus
bool spi_bus
True if spi_bus_initialize() has been called successfully.
Definition BNO08x.hpp:270
BNO08x::bno08x_init_status_t::isr_handler
bool isr_handler
True if HINT ISR handler has been initialized.
Definition BNO08x.hpp:266
BNO08x::bno08x_init_status_t::spi_device
bool spi_device
True if spi_bus_add_device() has been called successfully.
Definition BNO08x.hpp:271
BNO08x::bno08x_report_period_tracker_t
Definition BNO08x.hpp:255
BNO08x::bno08x_report_period_tracker_t::report_ID
uint8_t report_ID
Definition BNO08x.hpp:256
BNO08x::bno08x_report_period_tracker_t::period
uint32_t period
Definition BNO08x.hpp:257
BNO08x::bno08x_rx_packet_t
Holds data that is received over spi.
Definition BNO08x.hpp:241
BNO08x::bno08x_rx_packet_t::length
uint16_t length
Body of SHTP packet.
Definition BNO08x.hpp:244
BNO08x::bno08x_rx_packet_t::header
uint8_t header[4]
Header of SHTP packet.
Definition BNO08x.hpp:242
BNO08x::bno08x_rx_packet_t::body
uint8_t body[300]
Definition BNO08x.hpp:243
BNO08x::bno08x_tx_packet_t
Holds data that is sent over spi.
Definition BNO08x.hpp:249
BNO08x::bno08x_tx_packet_t::body
uint8_t body[50]
Body of SHTP the packet (header + body)
Definition BNO08x.hpp:250
BNO08x::bno08x_tx_packet_t::length
uint16_t length
Packet length in bytes.
Definition BNO08x.hpp:251
bno08x_config_t
IMU configuration settings passed into constructor.
Definition BNO08x_global_types.hpp:74