\doxysection{BNO08x.\+hpp} \label{_b_n_o08x_8hpp_source}\index{D:/development/git/esp32\_BNO08x/BNO08x.hpp@{D:/development/git/esp32\_BNO08x/BNO08x.hpp}} \begin{DoxyCode}{0} \DoxyCodeLine{00001\ \textcolor{preprocessor}{\#pragma\ once}} \DoxyCodeLine{00002\ } \DoxyCodeLine{00003\ \textcolor{comment}{//standard\ library\ includes}} \DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ }} \DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ }} \DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ }} \DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ }} \DoxyCodeLine{00008\ } \DoxyCodeLine{00009\ \textcolor{comment}{//esp-\/idf\ includes}} \DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ "{}driver/gpio.h"{}}} \DoxyCodeLine{00011\ \textcolor{preprocessor}{\#include\ "{}esp\_rom\_gpio.h"{}}} \DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ "{}driver/spi\_common.h"{}}} \DoxyCodeLine{00013\ \textcolor{preprocessor}{\#include\ "{}driver/spi\_master.h"{}}} \DoxyCodeLine{00014\ \textcolor{preprocessor}{\#include\ "{}freertos/FreeRTOS.h"{}}} \DoxyCodeLine{00015\ \textcolor{preprocessor}{\#include\ "{}freertos/task.h"{}}} \DoxyCodeLine{00016\ \textcolor{preprocessor}{\#include\ "{}freertos/semphr.h"{}}} \DoxyCodeLine{00017\ \textcolor{preprocessor}{\#include\ "{}esp\_log.h"{}}} \DoxyCodeLine{00018\ \textcolor{preprocessor}{\#include\ "{}esp\_timer.h"{}}} \DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ "{}rom/ets\_sys.h"{}}} \DoxyCodeLine{00020\ } \DoxyCodeLine{00022\ \textcolor{keyword}{enum}\ channels\_t\ } \DoxyCodeLine{00023\ \{} \DoxyCodeLine{00024\ \ \ \ \ CHANNEL\_COMMAND,\ } \DoxyCodeLine{00025\ \ \ \ \ CHANNEL\_EXECUTABLE,} \DoxyCodeLine{00026\ \ \ \ \ CHANNEL\_CONTROL,} \DoxyCodeLine{00027\ \ \ \ \ CHANNEL\_REPORTS,} \DoxyCodeLine{00028\ \ \ \ \ CHANNEL\_WAKE\_REPORTS,} \DoxyCodeLine{00029\ \ \ \ \ CHANNEL\_GYRO} \DoxyCodeLine{00030\ \};} \DoxyCodeLine{00031\ } \DoxyCodeLine{00033\ \textcolor{keyword}{enum}\ sensor\_accuracy\_t} \DoxyCodeLine{00034\ \{\ \ \ } \DoxyCodeLine{00035\ \ \ \ \ LOW\_ACCURACY\ =\ 1,} \DoxyCodeLine{00036\ \ \ \ \ MED\_ACCURACY,} \DoxyCodeLine{00037\ \ \ \ \ HIGH\_ACCURACY} \DoxyCodeLine{00038\ \};} \DoxyCodeLine{00039\ } \DoxyCodeLine{00041\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }bno08x\_config\_t\ } \DoxyCodeLine{00042\ \{} \DoxyCodeLine{00043\ \ \ \ \ spi\_host\_device\_t\ spi\_peripheral;\ } \DoxyCodeLine{00044\ \ \ \ \ gpio\_num\_t\ io\_mosi;\ } \DoxyCodeLine{00045\ \ \ \ \ gpio\_num\_t\ io\_miso;\ } \DoxyCodeLine{00046\ \ \ \ \ gpio\_num\_t\ io\_sclk;\ } \DoxyCodeLine{00047\ \ \ \ \ gpio\_num\_t\ io\_cs;\ } \DoxyCodeLine{00048\ \ \ \ \ gpio\_num\_t\ io\_int;\ } \DoxyCodeLine{00049\ \ \ \ \ gpio\_num\_t\ io\_rst;\ } \DoxyCodeLine{00050\ \ \ \ \ gpio\_num\_t\ io\_wake;\ \ } \DoxyCodeLine{00051\ \ \ \ \ uint64\_t\ sclk\_speed;\ } \DoxyCodeLine{00052\ \ \ \ \ \textcolor{keywordtype}{bool}\ debug\_en;\ } \DoxyCodeLine{00053\ \ \ \ \ } \DoxyCodeLine{00055\ \ \ \ \ bno08x\_config\_t()\ :\ } \DoxyCodeLine{00056\ \ \ \ \ spi\_peripheral(SPI3\_HOST),\ } \DoxyCodeLine{00057\ \ \ \ \ io\_mosi(GPIO\_NUM\_23),\ } \DoxyCodeLine{00058\ \ \ \ \ io\_miso(GPIO\_NUM\_19),\ } \DoxyCodeLine{00059\ \ \ \ \ io\_sclk(GPIO\_NUM\_18),\ \ } \DoxyCodeLine{00060\ \ \ \ \ io\_cs(GPIO\_NUM\_33),\ } \DoxyCodeLine{00061\ \ \ \ \ io\_int(GPIO\_NUM\_26),\ } \DoxyCodeLine{00062\ \ \ \ \ io\_rst(GPIO\_NUM\_32),} \DoxyCodeLine{00063\ \ \ \ \ io\_wake(GPIO\_NUM\_4),} \DoxyCodeLine{00064\ \ \ \ \ \textcolor{comment}{//sclk\_speed(10000U),\ //clock\ slowed\ to\ see\ on\ AD2}} \DoxyCodeLine{00065\ \ \ \ \ sclk\_speed(2000000U),\ \textcolor{comment}{//1MHz\ SCLK\ speed\ }} \DoxyCodeLine{00066\ \ \ \ \ debug\_en(false)} \DoxyCodeLine{00067\ } \DoxyCodeLine{00068\ \ \ \ \ \{} \DoxyCodeLine{00069\ \ \ \ \ \}\ \ } \DoxyCodeLine{00070\ } \DoxyCodeLine{00071\ \}\ bno08x\_config\_t;} \DoxyCodeLine{00072\ } \DoxyCodeLine{00073\ \textcolor{keyword}{class\ }BNO08x\ } \DoxyCodeLine{00074\ \{} \DoxyCodeLine{00075\ \ \ \ \ \textcolor{keyword}{public}:} \DoxyCodeLine{00076\ \ \ \ \ \ \ \ \ BNO08x(bno08x\_config\_t\ imu\_config\ =\ default\_imu\_config);} \DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ initialize();} \DoxyCodeLine{00078\ } \DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ hard\_reset();} \DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ soft\_reset();} \DoxyCodeLine{00081\ \ \ \ \ \ \ \ \ uint8\_t\ get\_reset\_reason();} \DoxyCodeLine{00082\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ mode\_sleep();} \DoxyCodeLine{00083\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ mode\_on();\ } \DoxyCodeLine{00084\ \ \ \ \ \ \ \ \ } \DoxyCodeLine{00085\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ q\_to\_float(int16\_t\ fixed\_point\_value,\ uint8\_t\ q\_point);} \DoxyCodeLine{00086\ \ \ \ \ \ \ \ \ } \DoxyCodeLine{00087\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ run\_full\_calibration\_routine();\ } \DoxyCodeLine{00088\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ calibrate\_all();} \DoxyCodeLine{00089\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ calibrate\_accelerometer();} \DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ calibrate\_gyro();} \DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ calibrate\_magnetometer();} \DoxyCodeLine{00092\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ calibrate\_planar\_accelerometer();} \DoxyCodeLine{00093\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ request\_calibration\_status();\ } \DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ calibration\_complete();\ } \DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ end\_calibration();} \DoxyCodeLine{00096\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ save\_calibration();} \DoxyCodeLine{00097\ } \DoxyCodeLine{00098\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_rotation\_vector(uint16\_t\ time\_between\_reports);} \DoxyCodeLine{00099\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_game\_rotation\_vector(uint16\_t\ time\_between\_reports);} \DoxyCodeLine{00100\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_ARVR\_stabilized\_rotation\_vector(uint16\_t\ time\_between\_reports);} \DoxyCodeLine{00101\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_ARVR\_stabilized\_game\_rotation\_vector(uint16\_t\ time\_between\_reports);} \DoxyCodeLine{00102\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_gyro\_integrated\_rotation\_vector(uint16\_t\ timeBetweenReports);} \DoxyCodeLine{00103\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_accelerometer(uint16\_t\ time\_between\_reports);} \DoxyCodeLine{00104\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_linear\_accelerometer(uint16\_t\ time\_between\_reports);} \DoxyCodeLine{00105\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_gravity(uint16\_t\ time\_between\_reports);} \DoxyCodeLine{00106\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_gyro(uint16\_t\ time\_between\_reports);} \DoxyCodeLine{00107\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_uncalibrated\_gyro(uint16\_t\ time\_between\_reports);} \DoxyCodeLine{00108\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_magnetometer(uint16\_t\ time\_between\_reports);} \DoxyCodeLine{00109\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_tap\_detector(uint16\_t\ time\_between\_reports);} \DoxyCodeLine{00110\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_step\_counter(uint16\_t\ time\_between\_reports);} \DoxyCodeLine{00111\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_stability\_classifier(uint16\_t\ time\_between\_reports);} \DoxyCodeLine{00112\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_activity\_classifier(uint16\_t\ time\_between\_reports,\ uint32\_t\ activities\_to\_enable,\ uint8\_t\ (\&activity\_confidence\_vals)[9]);} \DoxyCodeLine{00113\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_raw\_accelerometer(uint16\_t\ time\_between\_reports);} \DoxyCodeLine{00114\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_raw\_gyro(uint16\_t\ time\_between\_reports);} \DoxyCodeLine{00115\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ enable\_raw\_magnetometer(uint16\_t\ time\_between\_reports);} \DoxyCodeLine{00116\ \ \ \ } \DoxyCodeLine{00117\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ tare\_now(uint8\_t\ axis\_sel\ =\ TARE\_AXIS\_ALL,\ uint8\_t\ rotation\_vector\_basis\ =\ TARE\_ROTATION\_VECTOR);} \DoxyCodeLine{00118\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ save\_tare();} \DoxyCodeLine{00119\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ clear\_tare();\ } \DoxyCodeLine{00120\ } \DoxyCodeLine{00121\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ data\_available();\ } \DoxyCodeLine{00122\ \ \ \ \ \ \ \ \ uint16\_t\ parse\_input\_report();\ \ \ } \DoxyCodeLine{00123\ \ \ \ \ \ \ \ \ uint16\_t\ parse\_command\_report();\ } \DoxyCodeLine{00124\ \ \ \ \ \ \ \ \ uint16\_t\ get\_readings();} \DoxyCodeLine{00125\ } \DoxyCodeLine{00126\ \ \ \ \ \ \ \ \ uint32\_t\ get\_time\_stamp();} \DoxyCodeLine{00127\ } \DoxyCodeLine{00128\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ get\_magf(\textcolor{keywordtype}{float}\ \&x,\ \textcolor{keywordtype}{float}\ \&y,\ \textcolor{keywordtype}{float}\ \&z,\ uint8\_t\ \&accuracy);} \DoxyCodeLine{00129\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_magf\_X();} \DoxyCodeLine{00130\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_magf\_Y();} \DoxyCodeLine{00131\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_magf\_Z();} \DoxyCodeLine{00132\ \ \ \ \ \ \ \ \ uint8\_t\ get\_magf\_accuracy();} \DoxyCodeLine{00133\ } \DoxyCodeLine{00134\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ get\_gravity(\textcolor{keywordtype}{float}\ \&x,\ \textcolor{keywordtype}{float}\ \&y,\ \textcolor{keywordtype}{float}\ \&z,\ uint8\_t\ \&accuracy);} \DoxyCodeLine{00135\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_gravity\_X();} \DoxyCodeLine{00136\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_gravity\_Y();} \DoxyCodeLine{00137\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_gravity\_Z();} \DoxyCodeLine{00138\ \ \ \ \ \ \ \ \ uint8\_t\ get\_gravity\_accuracy();} \DoxyCodeLine{00139\ } \DoxyCodeLine{00140\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_roll();} \DoxyCodeLine{00141\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_pitch();} \DoxyCodeLine{00142\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_yaw();} \DoxyCodeLine{00143\ } \DoxyCodeLine{00144\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_roll\_deg();} \DoxyCodeLine{00145\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_pitch\_deg();} \DoxyCodeLine{00146\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_yaw\_deg();} \DoxyCodeLine{00147\ } \DoxyCodeLine{00148\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ get\_quat(\textcolor{keywordtype}{float}\ \&i,\ \textcolor{keywordtype}{float}\ \&j,\ \textcolor{keywordtype}{float}\ \&k,\ \textcolor{keywordtype}{float}\ \&real,\ \textcolor{keywordtype}{float}\ \&rad\_accuracy,\ uint8\_t\ \&accuracy);} \DoxyCodeLine{00149\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_quat\_I();} \DoxyCodeLine{00150\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_quat\_J();} \DoxyCodeLine{00151\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_quat\_K();} \DoxyCodeLine{00152\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_quat\_real();} \DoxyCodeLine{00153\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_quat\_radian\_accuracy();} \DoxyCodeLine{00154\ \ \ \ \ \ \ \ \ uint8\_t\ get\_quat\_accuracy();} \DoxyCodeLine{00155\ } \DoxyCodeLine{00156\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ get\_accel(\textcolor{keywordtype}{float}\ \&x,\ \textcolor{keywordtype}{float}\ \&y,\ \textcolor{keywordtype}{float}\ \&z,\ uint8\_t\ \&accuracy);} \DoxyCodeLine{00157\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_accel\_X();} \DoxyCodeLine{00158\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_accel\_Y();} \DoxyCodeLine{00159\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_accel\_Z();} \DoxyCodeLine{00160\ \ \ \ \ \ \ \ \ uint8\_t\ get\_accel\_accuracy();} \DoxyCodeLine{00161\ \ \ \ \ \ \ \ \ } \DoxyCodeLine{00162\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ get\_linear\_accel(\textcolor{keywordtype}{float}\ \&x,\ \textcolor{keywordtype}{float}\ \&y,\ \textcolor{keywordtype}{float}\ \&z,\ uint8\_t\ \&accuracy);} \DoxyCodeLine{00163\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_linear\_accel\_X();} \DoxyCodeLine{00164\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_linear\_accel\_Y();} \DoxyCodeLine{00165\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_linear\_accel\_Z();} \DoxyCodeLine{00166\ \ \ \ \ \ \ \ \ uint8\_t\ get\_linear\_accel\_accuracy();} \DoxyCodeLine{00167\ } \DoxyCodeLine{00168\ \ \ \ \ \ \ \ \ int16\_t\ get\_raw\_accel\_X();} \DoxyCodeLine{00169\ \ \ \ \ \ \ \ \ int16\_t\ get\_raw\_accel\_Y();} \DoxyCodeLine{00170\ \ \ \ \ \ \ \ \ int16\_t\ get\_raw\_accel\_Z();} \DoxyCodeLine{00171\ } \DoxyCodeLine{00172\ \ \ \ \ \ \ \ \ int16\_t\ get\_raw\_gyro\_X();} \DoxyCodeLine{00173\ \ \ \ \ \ \ \ \ int16\_t\ get\_raw\_gyro\_Y();} \DoxyCodeLine{00174\ \ \ \ \ \ \ \ \ int16\_t\ get\_raw\_gyro\_Z();} \DoxyCodeLine{00175\ } \DoxyCodeLine{00176\ \ \ \ \ \ \ \ \ int16\_t\ get\_raw\_magf\_X();} \DoxyCodeLine{00177\ \ \ \ \ \ \ \ \ int16\_t\ get\_raw\_magf\_Y();} \DoxyCodeLine{00178\ \ \ \ \ \ \ \ \ int16\_t\ get\_raw\_magf\_Z();} \DoxyCodeLine{00179\ } \DoxyCodeLine{00180\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ get\_gyro\_calibrated\_velocity(\textcolor{keywordtype}{float}\ \&x,\ \textcolor{keywordtype}{float}\ \&y,\ \textcolor{keywordtype}{float}\ \&z,\ uint8\_t\ \&accuracy);} \DoxyCodeLine{00181\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_gyro\_calibrated\_velocity\_X();} \DoxyCodeLine{00182\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_gyro\_calibrated\_velocity\_Y();} \DoxyCodeLine{00183\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_gyro\_calibrated\_velocity\_Z();} \DoxyCodeLine{00184\ \ \ \ \ \ \ \ \ uint8\_t\ get\_gyro\_accuracy();} \DoxyCodeLine{00185\ } \DoxyCodeLine{00186\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ get\_uncalibrated\_gyro(\textcolor{keywordtype}{float}\ \&x,\ \textcolor{keywordtype}{float}\ \&y,\ \textcolor{keywordtype}{float}\ \&z,\ \textcolor{keywordtype}{float}\ \&bx,\ \textcolor{keywordtype}{float}\ \&by,\ \textcolor{keywordtype}{float}\ \&bz,\ uint8\_t\ \&accuracy);} \DoxyCodeLine{00187\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_uncalibrated\_gyro\_X();} \DoxyCodeLine{00188\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_uncalibrated\_gyro\_Y();} \DoxyCodeLine{00189\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_uncalibrated\_gyro\_Z();} \DoxyCodeLine{00190\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_uncalibrated\_gyro\_bias\_X();} \DoxyCodeLine{00191\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_uncalibrated\_gyro\_bias\_Y();} \DoxyCodeLine{00192\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_uncalibrated\_gyro\_bias\_Z();} \DoxyCodeLine{00193\ \ \ \ \ \ \ \ \ uint8\_t\ get\_uncalibrated\_gyro\_accuracy();} \DoxyCodeLine{00194\ } \DoxyCodeLine{00195\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ get\_gyro\_velocity(\textcolor{keywordtype}{float}\ \&x,\ \textcolor{keywordtype}{float}\ \&y,\ \textcolor{keywordtype}{float}\ \&z);} \DoxyCodeLine{00196\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_gyro\_velocity\_X();} \DoxyCodeLine{00197\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_gyro\_velocity\_Y();} \DoxyCodeLine{00198\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_gyro\_velocity\_Z();} \DoxyCodeLine{00199\ } \DoxyCodeLine{00200\ \ \ \ \ \ \ \ \ uint8\_t\ get\_tap\_detector();} \DoxyCodeLine{00201\ \ \ \ \ \ \ \ \ uint16\_t\ get\_step\_count();} \DoxyCodeLine{00202\ \ \ \ \ \ \ \ \ int8\_t\ get\_stability\_classifier();} \DoxyCodeLine{00203\ \ \ \ \ \ \ \ \ uint8\_t\ get\_activity\_classifier();} \DoxyCodeLine{00204\ } \DoxyCodeLine{00205\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ print\_header();} \DoxyCodeLine{00206\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ print\_packet();} \DoxyCodeLine{00207\ } \DoxyCodeLine{00208\ \ \ \ \ \ \ \ \ \textcolor{comment}{//Metadata\ functions}} \DoxyCodeLine{00209\ \ \ \ \ \ \ \ \ int16\_t\ get\_Q1(uint16\_t\ record\_ID);} \DoxyCodeLine{00210\ \ \ \ \ \ \ \ \ int16\_t\ get\_Q2(uint16\_t\ record\_ID);} \DoxyCodeLine{00211\ \ \ \ \ \ \ \ \ int16\_t\ get\_Q3(uint16\_t\ record\_ID);} \DoxyCodeLine{00212\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_resolution(uint16\_t\ record\_ID);} \DoxyCodeLine{00213\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ get\_range(uint16\_t\ record\_ID);} \DoxyCodeLine{00214\ \ \ \ \ \ \ \ \ uint32\_t\ FRS\_read\_word(uint16\_t\ record\_ID,\ uint8\_t\ word\_number);} \DoxyCodeLine{00215\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ FRS\_read\_request(uint16\_t\ record\_ID,\ uint16\_t\ read\_offset,\ uint16\_t\ block\_size);} \DoxyCodeLine{00216\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ FRS\_read\_data(uint16\_t\ record\_ID,\ uint8\_t\ start\_location,\ uint8\_t\ words\_to\_read);} \DoxyCodeLine{00217\ } \DoxyCodeLine{00218\ \ \ \ \ \ \ \ \ \textcolor{comment}{//Record\ IDs\ from\ figure\ 29,\ page\ 29\ reference\ manual}} \DoxyCodeLine{00219\ \ \ \ \ \ \ \ \ \textcolor{comment}{//These\ are\ used\ to\ read\ the\ metadata\ for\ each\ sensor\ type}} \DoxyCodeLine{00220\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint16\_t\ FRS\_RECORDID\_ACCELEROMETER\ =\ 0xE302;} \DoxyCodeLine{00221\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint16\_t\ \ FRS\_RECORDID\_GYROSCOPE\_CALIBRATED\ =\ 0xE306;} \DoxyCodeLine{00222\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint16\_t\ \ FRS\_RECORDID\_MAGNETIC\_FIELD\_CALIBRATED\ =\ 0xE309;} \DoxyCodeLine{00223\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint16\_t\ \ FRS\_RECORDID\_ROTATION\_VECTOR\ =\ 0xE30B;} \DoxyCodeLine{00224\ } \DoxyCodeLine{00225\ \ \ \ \ } \DoxyCodeLine{00226\ \ \ \ \ \textcolor{keyword}{private}:} \DoxyCodeLine{00227\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ wait\_for\_device\_int();\ } \DoxyCodeLine{00228\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ receive\_packet();} \DoxyCodeLine{00229\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ send\_packet();\ } \DoxyCodeLine{00230\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ queue\_packet(uint8\_t\ channel\_number,\ uint8\_t\ data\_length);\ } \DoxyCodeLine{00231\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ queue\_command(uint8\_t\ command);\ } \DoxyCodeLine{00232\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ queue\_feature\_command(uint8\_t\ report\_ID,\ uint16\_t\ time\_between\_reports);} \DoxyCodeLine{00233\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ queue\_feature\_command(uint8\_t\ report\_ID,\ uint16\_t\ time\_between\_reports,\ uint32\_t\ specific\_config);} \DoxyCodeLine{00234\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ queue\_calibrate\_command(uint8\_t\ \_to\_calibrate);\ } \DoxyCodeLine{00235\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ queue\_tare\_command(uint8\_t\ command,\ uint8\_t\ axis\ =\ TARE\_AXIS\_ALL,\ uint8\_t\ rotation\_vector\_basis\ =\ TARE\_ROTATION\_VECTOR);\ } \DoxyCodeLine{00236\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ queue\_request\_product\_id\_command();\ } \DoxyCodeLine{00237\ } \DoxyCodeLine{00238\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ bno08x\_config\_t\ default\_imu\_config;\ } \DoxyCodeLine{00239\ } \DoxyCodeLine{00240\ \ \ \ \ \ \ \ \ \textcolor{keyword}{volatile}\ uint8\_t\ tx\_packet\_queued;\ } \DoxyCodeLine{00241\ \ \ \ \ \ \ \ \ SemaphoreHandle\_t\ tx\_semaphore;\ } \DoxyCodeLine{00242\ \ \ \ \ \ \ \ \ uint8\_t\ rx\_buffer[300];\ } \DoxyCodeLine{00243\ \ \ \ \ \ \ \ \ uint8\_t\ tx\_buffer[50];\ } \DoxyCodeLine{00244\ \ \ \ \ \ \ \ \ uint8\_t\ packet\_header\_rx[4];\ } \DoxyCodeLine{00245\ \ \ \ \ \ \ \ \ uint8\_t\ commands[20];\ } \DoxyCodeLine{00246\ \ \ \ \ \ \ \ \ uint8\_t\ sequence\_number[6];\ } \DoxyCodeLine{00247\ \ \ \ \ \ \ \ \ uint32\_t\ meta\_data[9];\ } \DoxyCodeLine{00248\ \ \ \ \ \ \ \ \ uint8\_t\ command\_sequence\_number\ =\ 0;\ } \DoxyCodeLine{00249\ \ \ \ \ \ \ \ \ uint16\_t\ packet\_length\_tx\ =\ 0;\ } \DoxyCodeLine{00250\ \ \ \ \ \ \ \ \ uint16\_t\ packet\_length\_rx\ =\ 0;\ } \DoxyCodeLine{00251\ } \DoxyCodeLine{00252\ \ \ \ \ \ \ \ \ bno08x\_config\_t\ imu\_config\{\};\ } \DoxyCodeLine{00253\ \ \ \ \ \ \ \ \ spi\_bus\_config\_t\ bus\_config\{\};\ } \DoxyCodeLine{00254\ \ \ \ \ \ \ \ \ spi\_device\_interface\_config\_t\ imu\_spi\_config\{\};\ } \DoxyCodeLine{00255\ \ \ \ \ \ \ \ \ spi\_device\_handle\_t\ spi\_hdl\{\};\ } \DoxyCodeLine{00256\ \ \ \ \ \ \ \ \ spi\_transaction\_t\ spi\_transaction\{\};\ } \DoxyCodeLine{00257\ } \DoxyCodeLine{00258\ \ \ \ \ \ \ \ \ \textcolor{comment}{//These\ are\ the\ raw\ sensor\ values\ (without\ Q\ applied)\ pulled\ from\ the\ user\ requested\ Input\ Report}} \DoxyCodeLine{00259\ \ \ \ \ \ \ \ \ uint32\_t\ time\_stamp;\ } \DoxyCodeLine{00260\ \ \ \ \ \ \ \ \ uint16\_t\ raw\_accel\_X,\ raw\_accel\_Y,\ raw\_accel\_Z,\ accel\_accuracy;\ } \DoxyCodeLine{00261\ \ \ \ \ \ \ \ \ uint16\_t\ raw\_lin\_accel\_X,\ raw\_lin\_accel\_Y,\ raw\_lin\_accel\_Z,\ accel\_lin\_accuracy;\ } \DoxyCodeLine{00262\ \ \ \ \ \ \ \ \ uint16\_t\ raw\_gyro\_X,\ raw\_gyro\_Y,\ raw\_gyro\_Z,\ gyro\_accuracy;\ } \DoxyCodeLine{00263\ \ \ \ \ \ \ \ \ uint16\_t\ raw\_quat\_I,\ raw\_quat\_J,\ raw\_quat\_K,\ raw\_quat\_real,\ raw\_quat\_radian\_accuracy,\ quat\_accuracy;\ } \DoxyCodeLine{00264\ \ \ \ \ \ \ \ \ uint16\_t\ raw\_velocity\_gyro\_X,\ raw\_velocity\_gyro\_Y,\ raw\_velocity\_gyro\_Z;} \DoxyCodeLine{00265\ \ \ \ \ \ \ \ \ uint16\_t\ gravity\_X,\ gravity\_Y,\ gravity\_Z,\ gravity\_accuracy;\ } \DoxyCodeLine{00266\ \ \ \ \ \ \ \ \ uint16\_t\ raw\_uncalib\_gyro\_X,\ raw\_uncalib\_gyro\_Y,\ raw\_uncalib\_gyro\_Z,\ raw\_bias\_X,\ raw\_bias\_Y,\ raw\_bias\_Z,\ uncalib\_gyro\_accuracy;\ } \DoxyCodeLine{00267\ \ \ \ \ \ \ \ \ uint16\_t\ raw\_magf\_X,\ raw\_magf\_Y,\ raw\_magf\_Z,\ magf\_accuracy;\ } \DoxyCodeLine{00268\ \ \ \ \ \ \ \ \ uint8\_t\ tap\_detector;\ } \DoxyCodeLine{00269\ \ \ \ \ \ \ \ \ uint16\_t\ step\_count;\ } \DoxyCodeLine{00270\ \ \ \ \ \ \ \ \ uint8\_t\ stability\_classifier;} \DoxyCodeLine{00271\ \ \ \ \ \ \ \ \ uint8\_t\ activity\_classifier;\ } \DoxyCodeLine{00272\ \ \ \ \ \ \ \ \ uint8\_t\ *activity\_confidences;} \DoxyCodeLine{00273\ \ \ \ \ \ \ \ \ uint8\_t\ calibration\_status;\ } \DoxyCodeLine{00274\ \ \ \ \ \ \ \ \ uint16\_t\ mems\_raw\_accel\_X,\ mems\_raw\_accel\_Y,\ mems\_raw\_accel\_Z;\ } \DoxyCodeLine{00275\ \ \ \ \ \ \ \ \ uint16\_t\ mems\_raw\_gyro\_X,\ mems\_raw\_gyro\_Y,\ mems\_raw\_gyro\_Z;\ \ } \DoxyCodeLine{00276\ \ \ \ \ \ \ \ \ uint16\_t\ mems\_raw\_magf\_X,\ mems\_raw\_magf\_Y,\ mems\_raw\_magf\_Z;\ \ \ \ } \DoxyCodeLine{00277\ } \DoxyCodeLine{00278\ \ \ \ \ \ \ \ \ \textcolor{comment}{//spi\ task}} \DoxyCodeLine{00279\ \ \ \ \ \ \ \ \ TaskHandle\_t\ spi\_task\_hdl;\ } \DoxyCodeLine{00280\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ spi\_task\_trampoline(\textcolor{keywordtype}{void}\ *arg);\ } \DoxyCodeLine{00281\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ spi\_task();\ } \DoxyCodeLine{00282\ } \DoxyCodeLine{00283\ \ \ \ \ \ \ \ \ \textcolor{keyword}{volatile}\ \textcolor{keywordtype}{bool}\ int\_asserted;\ } \DoxyCodeLine{00284\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ IRAM\_ATTR\ hint\_handler(\textcolor{keywordtype}{void}\ *arg);} \DoxyCodeLine{00285\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{bool}\ isr\_service\_installed;\ } \DoxyCodeLine{00286\ \ \ \ \ \ \ \ \ } \DoxyCodeLine{00287\ } \DoxyCodeLine{00288\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ int16\_t\ ROTATION\_VECTOR\_Q1\ =\ 14;\ } \DoxyCodeLine{00289\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ int16\_t\ ROTATION\_VECTOR\_ACCURACY\_Q1\ =\ 12;\ } \DoxyCodeLine{00290\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ int16\_t\ ACCELEROMETER\_Q1\ =\ 8;\ } \DoxyCodeLine{00291\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ int16\_t\ LINEAR\_ACCELEROMETER\_Q1\ =\ 8;\ } \DoxyCodeLine{00292\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ int16\_t\ GYRO\_Q1\ =\ 9;\ } \DoxyCodeLine{00293\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ int16\_t\ MAGNETOMETER\_Q1\ =\ 4;\ } \DoxyCodeLine{00294\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ int16\_t\ ANGULAR\_VELOCITY\_Q1\ =\ 10;\ } \DoxyCodeLine{00295\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ int16\_t\ GRAVITY\_Q1\ =\ 8;\ } \DoxyCodeLine{00296\ } \DoxyCodeLine{00297\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint64\_t\ HOST\_INT\_TIMEOUT\_US\ =\ 150000ULL;\ } \DoxyCodeLine{00298\ } \DoxyCodeLine{00299\ \ \ \ \ \ \ \ \ \textcolor{comment}{//Higher\ level\ calibration\ commands,\ used\ by\ queue\_calibrate\_command}} \DoxyCodeLine{00300\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ CALIBRATE\_ACCEL\ =\ 0;\ } \DoxyCodeLine{00301\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ CALIBRATE\_GYRO\ =\ 1;} \DoxyCodeLine{00302\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ CALIBRATE\_MAG\ =\ 2;\ } \DoxyCodeLine{00303\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ CALIBRATE\_PLANAR\_ACCEL\ =\ 3;\ } \DoxyCodeLine{00304\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ CALIBRATE\_ACCEL\_GYRO\_MAG\ =\ 4;\ } \DoxyCodeLine{00305\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ CALIBRATE\_STOP\ =\ 5;\ } \DoxyCodeLine{00306\ } \DoxyCodeLine{00307\ \ \ \ \ \ \ \ \ \textcolor{comment}{//Command\ IDs\ (see\ Ref.\ Manual\ 6.4)}} \DoxyCodeLine{00308\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ COMMAND\_ERRORS\ =\ 1;} \DoxyCodeLine{00309\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ COMMAND\_COUNTER\ =\ 2;} \DoxyCodeLine{00310\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ COMMAND\_TARE\ =\ 3;\ } \DoxyCodeLine{00311\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ COMMAND\_INITIALIZE\ =\ 4;\ } \DoxyCodeLine{00312\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ COMMAND\_DCD\ =\ 6;\ } \DoxyCodeLine{00313\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ COMMAND\_ME\_CALIBRATE\ =\ 7;\ } \DoxyCodeLine{00314\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ COMMAND\_DCD\_PERIOD\_SAVE\ =\ 9;\ } \DoxyCodeLine{00315\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ COMMAND\_OSCILLATOR\ =\ 10;\ } \DoxyCodeLine{00316\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ COMMAND\_CLEAR\_DCD\ =\ 11;\ } \DoxyCodeLine{00317\ } \DoxyCodeLine{00318\ \ \ \ \ \ \ \ \ \textcolor{comment}{//SHTP\ channel\ 2\ control\ report\ IDs,\ used\ in\ communication\ with\ sensor\ (See\ Ref.\ Manual\ 6.2)}} \DoxyCodeLine{00319\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SHTP\_REPORT\_COMMAND\_RESPONSE\ =\ 0xF1;\ } \DoxyCodeLine{00320\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SHTP\_REPORT\_COMMAND\_REQUEST\ =\ 0xF2;\ } \DoxyCodeLine{00321\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SHTP\_REPORT\_FRS\_READ\_RESPONSE\ =\ 0xF3;\ } \DoxyCodeLine{00322\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SHTP\_REPORT\_FRS\_READ\_REQUEST\ =\ 0xF4;\ } \DoxyCodeLine{00323\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SHTP\_REPORT\_PRODUCT\_ID\_RESPONSE\ =\ 0xF8;\ } \DoxyCodeLine{00324\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SHTP\_REPORT\_PRODUCT\_ID\_REQUEST\ =\ 0xF9;\ } \DoxyCodeLine{00325\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SHTP\_REPORT\_BASE\_TIMESTAMP\ =\ 0xFB;\ } \DoxyCodeLine{00326\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SHTP\_REPORT\_SET\_FEATURE\_COMMAND\ =\ 0xFD;\ } \DoxyCodeLine{00327\ } \DoxyCodeLine{00328\ } \DoxyCodeLine{00329\ \ \ \ \ \ \ \ \ \textcolor{comment}{//Sensor\ report\ IDs,\ used\ when\ enabling\ and\ reading\ BNO08x\ reports}} \DoxyCodeLine{00330\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_ACCELEROMETER\ =\ 0x01;\ } \DoxyCodeLine{00331\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_GYROSCOPE\ =\ 0x02;\ } \DoxyCodeLine{00332\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_MAGNETIC\_FIELD\ =\ 0x03;\ } \DoxyCodeLine{00333\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_LINEAR\_ACCELERATION\ =\ 0x04;\ } \DoxyCodeLine{00334\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_ROTATION\_VECTOR\ =\ 0x05;\ } \DoxyCodeLine{00335\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_GRAVITY\ =\ 0x06;\ } \DoxyCodeLine{00336\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_UNCALIBRATED\_GYRO\ =\ 0x07;\ } \DoxyCodeLine{00337\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_GAME\_ROTATION\_VECTOR\ =\ 0x08;\ } \DoxyCodeLine{00338\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_GEOMAGNETIC\_ROTATION\_VECTOR\ =\ 0x09;\ } \DoxyCodeLine{00339\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_GYRO\_INTEGRATED\_ROTATION\_VECTOR\ =\ 0x2A;\ } \DoxyCodeLine{00340\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_TAP\_DETECTOR\ =\ 0x10;} \DoxyCodeLine{00341\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_STEP\_COUNTER\ =\ 0x11;\ } \DoxyCodeLine{00342\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_STABILITY\_CLASSIFIER\ =\ 0x13;\ } \DoxyCodeLine{00343\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_RAW\_ACCELEROMETER\ =\ 0x14;\ } \DoxyCodeLine{00344\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_RAW\_GYROSCOPE\ =\ 0x15;\ } \DoxyCodeLine{00345\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_RAW\_MAGNETOMETER\ =\ 0x16;\ } \DoxyCodeLine{00346\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_PERSONAL\_ACTIVITY\_CLASSIFIER\ =\ 0x1E;\ } \DoxyCodeLine{00347\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_AR\_VR\_STABILIZED\_ROTATION\_VECTOR\ =\ 0x28;\ } \DoxyCodeLine{00348\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ SENSOR\_REPORTID\_AR\_VR\_STABILIZED\_GAME\_ROTATION\_VECTOR\ =\ 0x29;\ } \DoxyCodeLine{00349\ } \DoxyCodeLine{00350\ \ \ \ \ \ \ \ \ \textcolor{comment}{//Tare\ commands\ used\ by\ queue\_tare\_command}} \DoxyCodeLine{00351\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ TARE\_NOW\ =\ 0;\ } \DoxyCodeLine{00352\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ TARE\_PERSIST\ =\ 1;\ } \DoxyCodeLine{00353\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ TARE\_SET\_REORIENTATION\ =\ 2;\ } \DoxyCodeLine{00354\ } \DoxyCodeLine{00355\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ TARE\_AXIS\_ALL\ =\ 0x07;\ } \DoxyCodeLine{00356\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ TARE\_AXIS\_Z\ \ \ =\ 0x04;\ } \DoxyCodeLine{00357\ } \DoxyCodeLine{00358\ \ \ \ \ \ \ \ \ \textcolor{comment}{//Which\ rotation\ vector\ to\ tare,\ BNO08x\ saves\ them\ seperately}} \DoxyCodeLine{00359\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ TARE\_ROTATION\_VECTOR\ =\ 0;\ } \DoxyCodeLine{00360\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ TARE\_GAME\_ROTATION\_VECTOR\ =\ 1;\ } \DoxyCodeLine{00361\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ TARE\_GEOMAGNETIC\_ROTATION\_VECTOR\ =\ 2;} \DoxyCodeLine{00362\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ TARE\_GYRO\_INTEGRATED\_ROTATION\_VECTOR\ =\ 3;\ } \DoxyCodeLine{00363\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ TARE\_AR\_VR\_STABILIZED\_ROTATION\_VECTOR\ =\ 4;\ } \DoxyCodeLine{00364\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ uint8\_t\ TARE\_AR\_VR\_STABILIZED\_GAME\_ROTATION\_VECTOR\ =\ 5;\ } \DoxyCodeLine{00365\ } \DoxyCodeLine{00366\ \ \ \ \ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keyword}{constexpr}\ \textcolor{keywordtype}{char}\ *TAG\ =\ \textcolor{stringliteral}{"{}BNO08x"{}};\ } \DoxyCodeLine{00367\ \};} \end{DoxyCode}