esp32_BNO08x 1.2
C++ BNO08x IMU driver component for esp-idf.
Loading...
Searching...
No Matches
BNO08xTestHelper.hpp
Go to the documentation of this file.
1
5#pragma once
6
7#include "stdio.h"
8#include "BNO08x.hpp"
9
16{
17 private:
18 inline static BNO08x* test_imu = nullptr;
19 inline static bno08x_config_t imu_cfg;
20
21 static const constexpr char* TAG = "BNO08xTestHelper";
22
23 public:
80
88 static void print_test_start_banner(const char* TEST_TAG)
89 {
90 printf("------------------------ BEGIN TEST: %s ------------------------\n\r", TEST_TAG);
91 }
92
100 static void print_test_end_banner(const char* TEST_TAG)
101 {
102 printf("------------------------ END TEST: %s ------------------------\n\r", TEST_TAG);
103 }
104
113 static void print_test_msg(const char* TEST_TAG, const char* msg)
114 {
115 printf("%s: %s: %s\n\r", TAG, TEST_TAG, msg);
116 }
117
126 {
127 imu_cfg = cfg;
128 }
129
135 static void create_test_imu()
136 {
137 if (test_imu != nullptr)
139
140 test_imu = new BNO08x();
141 }
142
148 static void destroy_test_imu()
149 {
150 if (test_imu != nullptr)
151 {
152 delete test_imu;
153 test_imu = nullptr;
154 }
155 }
156
163 {
164 return test_imu;
165 }
166
172 static esp_err_t call_init_config_args()
173 {
174 if (test_imu == nullptr)
175 return ESP_FAIL;
176
177 return test_imu->init_config_args();
178 }
179
185 static esp_err_t call_init_gpio()
186 {
187 if (test_imu == nullptr)
188 return ESP_FAIL;
189
190 return test_imu->init_gpio();
191 }
192
198 static esp_err_t call_init_hint_isr()
199 {
200 if (test_imu == nullptr)
201 return ESP_FAIL;
202
203 return test_imu->init_hint_isr();
204 }
205
211 static esp_err_t call_init_spi()
212 {
213 if (test_imu == nullptr)
214 return ESP_FAIL;
215
216 return test_imu->init_spi();
217 }
218
224 static esp_err_t call_launch_tasks()
225 {
226 if (test_imu == nullptr)
227 return ESP_FAIL;
228
229 return test_imu->launch_tasks();
230 }
231
241 {
242 bool new_data = false;
243
244 // prev report should always contain the default test values as per test structure
245 if (report_data->quat_I != default_report_data->quat_I)
246 new_data = true;
247
248 if (report_data->quat_J != default_report_data->quat_J)
249 new_data = true;
250
251 if (report_data->quat_K != default_report_data->quat_K)
252 new_data = true;
253
254 if (report_data->quat_real != default_report_data->quat_real)
255 new_data = true;
256
257 if (report_data->quat_accuracy != default_report_data->quat_accuracy)
258 new_data = true;
259
260 if (report_data->quat_radian_accuracy != default_report_data->quat_radian_accuracy)
261 new_data = true;
262
263 return new_data;
264 }
265
275 {
276 bool new_data = false;
277
278 if (report_data->quat_I != default_report_data->quat_I)
279 new_data = true;
280
281 if (report_data->quat_J != default_report_data->quat_J)
282 new_data = true;
283
284 if (report_data->quat_K != default_report_data->quat_K)
285 new_data = true;
286
287 if (report_data->quat_real != default_report_data->quat_real)
288 new_data = true;
289
290 if (report_data->integrated_gyro_vel_x != default_report_data->integrated_gyro_vel_x)
291 new_data = true;
292
293 if (report_data->integrated_gyro_vel_y != default_report_data->integrated_gyro_vel_y)
294 new_data = true;
295
296 if (report_data->integrated_gyro_vel_z != default_report_data->integrated_gyro_vel_z)
297 new_data = true;
298
299 return new_data;
300 }
301
311 {
312 bool new_data = false;
313
314 if (report_data->uncalib_gyro_vel_x != default_report_data->uncalib_gyro_vel_x)
315 new_data = true;
316
317 if (report_data->uncalib_gyro_vel_y != default_report_data->uncalib_gyro_vel_y)
318 new_data = true;
319
320 if (report_data->uncalib_gyro_vel_z != default_report_data->uncalib_gyro_vel_z)
321 new_data = true;
322
323 if (report_data->uncalib_gyro_drift_x != default_report_data->uncalib_gyro_drift_x)
324 new_data = true;
325
326 if (report_data->uncalib_gyro_drift_y != default_report_data->uncalib_gyro_drift_y)
327 new_data = true;
328
329 if (report_data->uncalib_gyro_drift_z != default_report_data->uncalib_gyro_drift_z)
330 new_data = true;
331
332 return new_data;
333 }
334
344 {
345 bool new_data = false;
346
347 if (report_data->calib_gyro_vel_x != default_report_data->calib_gyro_vel_x)
348 new_data = true;
349
350 if (report_data->calib_gyro_vel_y != default_report_data->calib_gyro_vel_y)
351 new_data = true;
352
353 if (report_data->calib_gyro_vel_z != default_report_data->calib_gyro_vel_z)
354 new_data = true;
355
356 return new_data;
357 }
358
368 {
369 bool new_data = false;
370
371 if (report_data->accel_x != default_report_data->accel_x)
372 new_data = true;
373
374 if (report_data->accel_y != default_report_data->accel_y)
375 new_data = true;
376
377 if (report_data->accel_z != default_report_data->accel_z)
378 new_data = true;
379
380 if (report_data->accel_accuracy != default_report_data->accel_accuracy)
381 new_data = true;
382
383 return new_data;
384 }
385
395 {
396 bool new_data = false;
397
398 if (report_data->lin_accel_x != default_report_data->lin_accel_x)
399 new_data = true;
400
401 if (report_data->lin_accel_y != default_report_data->lin_accel_y)
402 new_data = true;
403
404 if (report_data->lin_accel_z != default_report_data->lin_accel_z)
405 new_data = true;
406
407 if (report_data->lin_accel_accuracy != default_report_data->lin_accel_accuracy)
408 new_data = true;
409
410 return new_data;
411 }
412
422 {
423 bool new_data = false;
424
425 if (report_data->grav_x != default_report_data->grav_x)
426 new_data = true;
427
428 if (report_data->grav_y != default_report_data->grav_y)
429 new_data = true;
430
431 if (report_data->grav_z != default_report_data->grav_z)
432 new_data = true;
433
434 if (report_data->grav_accuracy != default_report_data->grav_accuracy)
435 new_data = true;
436
437 return new_data;
438 }
439
449 {
450 bool new_data = false;
451
452 if (report_data->magf_x != default_report_data->magf_x)
453 new_data = true;
454
455 if (report_data->magf_y != default_report_data->magf_y)
456 new_data = true;
457
458 if (report_data->magf_z != default_report_data->magf_z)
459 new_data = true;
460
461 if (report_data->magf_accuracy != default_report_data->magf_accuracy)
462 new_data = true;
463
464 return new_data;
465 }
466
476 {
477 bool new_data = false;
478
479 if (report_data->step_count != default_report_data->step_count)
480 new_data = true;
481
482 return new_data;
483 }
484
494 {
495 bool new_data = false;
496
497 if (report_data->stability_classifier != default_report_data->stability_classifier)
498 new_data = true;
499
500 return new_data;
501 }
502
512 {
513 bool new_data = false;
514
515 if (report_data->activity_classifier != default_report_data->activity_classifier)
516 new_data = true;
517
518 return new_data;
519 }
520
529 {
530
547 }
548
555 {
556 static const constexpr uint16_t TEST_VAL_UINT16 = 65535U;
557 static const constexpr uint16_t TEST_VAL_UINT8 = 255;
558 test_imu->time_stamp = 0UL;
559
560 test_imu->raw_accel_X = TEST_VAL_UINT16;
561 test_imu->raw_accel_Y = TEST_VAL_UINT16;
562 test_imu->raw_accel_Z = TEST_VAL_UINT16;
563 test_imu->accel_accuracy = static_cast<uint16_t>(BNO08xAccuracy::UNDEFINED);
564
565 test_imu->raw_lin_accel_X = TEST_VAL_UINT16;
566 test_imu->raw_lin_accel_Y = TEST_VAL_UINT16;
567 test_imu->raw_lin_accel_Z = TEST_VAL_UINT16;
568 test_imu->accel_lin_accuracy = static_cast<uint16_t>(BNO08xAccuracy::UNDEFINED);
569
570 test_imu->raw_calib_gyro_X = TEST_VAL_UINT16;
571 test_imu->raw_calib_gyro_Y = TEST_VAL_UINT16;
572 test_imu->raw_calib_gyro_Z = TEST_VAL_UINT16;
573
574 // reset quaternion to nan
575 test_imu->raw_quat_I = TEST_VAL_UINT16;
576 test_imu->raw_quat_J = TEST_VAL_UINT16;
577 test_imu->raw_quat_K = TEST_VAL_UINT16;
578 test_imu->raw_quat_real = TEST_VAL_UINT16;
580 test_imu->quat_accuracy = static_cast<uint16_t>(BNO08xAccuracy::UNDEFINED);
581
582 test_imu->integrated_gyro_velocity_X = TEST_VAL_UINT16;
583 test_imu->integrated_gyro_velocity_Y = TEST_VAL_UINT16;
584 test_imu->integrated_gyro_velocity_Z = TEST_VAL_UINT16;
585
586 test_imu->gravity_X = TEST_VAL_UINT16;
587 test_imu->gravity_Y = TEST_VAL_UINT16;
588 test_imu->gravity_Z = TEST_VAL_UINT16;
589 test_imu->gravity_accuracy = static_cast<uint16_t>(BNO08xAccuracy::UNDEFINED);
590
591 test_imu->raw_uncalib_gyro_X = TEST_VAL_UINT16;
592 test_imu->raw_uncalib_gyro_Y = TEST_VAL_UINT16;
593 test_imu->raw_uncalib_gyro_Z = TEST_VAL_UINT16;
594 test_imu->raw_bias_X = TEST_VAL_UINT16;
595 test_imu->raw_bias_Y = TEST_VAL_UINT16;
596 test_imu->raw_bias_Z = TEST_VAL_UINT16;
597
598 test_imu->raw_magf_X = TEST_VAL_UINT16;
599 test_imu->raw_magf_Y = TEST_VAL_UINT16;
600 test_imu->raw_magf_Z = TEST_VAL_UINT16;
601 test_imu->magf_accuracy = static_cast<uint16_t>(BNO08xAccuracy::UNDEFINED);
602
603 test_imu->tap_detector = TEST_VAL_UINT8;
604 test_imu->step_count = TEST_VAL_UINT16;
607
608 test_imu->mems_raw_accel_X = TEST_VAL_UINT16;
609 test_imu->mems_raw_accel_Y = TEST_VAL_UINT16;
610 test_imu->mems_raw_accel_Z = TEST_VAL_UINT16;
611
612 test_imu->mems_raw_gyro_X = TEST_VAL_UINT16;
613 test_imu->mems_raw_gyro_Y = TEST_VAL_UINT16;
614 test_imu->mems_raw_gyro_Z = TEST_VAL_UINT16;
615
616 test_imu->mems_raw_magf_X = TEST_VAL_UINT16;
617 test_imu->mems_raw_magf_Y = TEST_VAL_UINT16;
618 test_imu->mems_raw_magf_Z = TEST_VAL_UINT16;
619 }
620
628 static const char* BNO08xAccuracy_to_str(BNO08xAccuracy accuracy)
629 {
630 switch (accuracy)
631 {
633 return "LOW";
635 return "MED";
637 return "HIGH";
639 return "UNDEFINED";
640 default:
641 return "INVALID";
642 }
643 };
644
652 static const char* BNO08xStability_to_str(BNO08xStability stability)
653 {
654 switch (stability)
655 {
657 return "UNKNOWN";
659 return "ON TABLE";
661 return "STATIONARY";
663 return "UNDEFINED";
664 default:
665 return "INVALID";
666 }
667 }
668
676 static const char* BNO08xActivity_to_str(BNO08xActivity activity)
677 {
678 switch (activity)
679 {
681 return "UNKNOWN";
683 return "IN VEHICLE";
685 return "ON BICYCLE";
687 return "ON FOOT";
689 return "STILL";
691 return "TILTING";
693 return "WALKING";
695 return "RUNNING";
697 return "ON STAIRS";
699 return "UNDEFINED";
700 default:
701 return "INVALID";
702 }
703 }
704};
BNO08xStability
BNO08xStability states returned from get_stability_classifier()
Definition BNO08x_global_types.hpp:65
BNO08xActivity
BNO08xActivity states returned from get_activity_classifier()
Definition BNO08x_global_types.hpp:50
BNO08xAccuracy
Sensor accuracy returned during sensor calibration.
Definition BNO08x_global_types.hpp:13
BNO08xTestHelper::imu_report_data_t report_data
Definition CallbackTests.cpp:21
bool new_data
Definition CallbackTests.cpp:25
BNO08x IMU driver class.
Definition BNO08x.hpp:34
uint16_t integrated_gyro_velocity_Y
Definition BNO08x.hpp:399
uint16_t raw_quat_radian_accuracy
Definition BNO08x.hpp:397
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
esp_err_t launch_tasks()
Launches spi_task and data_proc_task on constructor call.
Definition BNO08x.cpp:4003
uint16_t raw_bias_Z
Uncalibrated gyro reading (See SH-2 Ref. Manual 6.5.14)
Definition BNO08x.hpp:404
uint8_t tap_detector
Tap detector reading (See SH-2 Ref. Manual 6.5.27)
Definition BNO08x.hpp:407
uint8_t stability_classifier
BNO08xStability status reading (See SH-2 Ref. Manual 6.5.31)
Definition BNO08x.hpp:409
BNO08xStability get_stability_classifier()
Get the current stability classifier (Seee Ref. Manual 6.5.31)
Definition BNO08x.cpp:3508
uint16_t accel_accuracy
Raw acceleration readings (See SH-2 Ref. Manual 6.5.8)
Definition BNO08x.hpp:393
uint16_t accel_lin_accuracy
Raw linear acceleration (See SH-2 Ref. Manual 6.5.10)
Definition BNO08x.hpp:395
uint16_t quat_accuracy
Raw quaternion reading (See SH-2 Ref. Manual 6.5.44)
Definition BNO08x.hpp:398
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
uint16_t mems_raw_gyro_X
Definition BNO08x.hpp:415
BNO08xActivity get_activity_classifier()
Get the current activity classifier (Seee Ref. Manual 6.5.36)
Definition BNO08x.cpp:3527
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
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
esp_err_t init_spi()
Initializes SPI.
Definition BNO08x.cpp:372
uint16_t mems_raw_accel_Z
Raw accelerometer readings from MEMS sensor (See SH2 Ref. Manual 6.5.8)
Definition BNO08x.hpp:414
uint16_t raw_quat_J
Definition BNO08x.hpp:397
uint16_t integrated_gyro_velocity_X
Definition BNO08x.hpp:399
uint16_t raw_calib_gyro_Y
Definition BNO08x.hpp:396
uint16_t raw_quat_I
Definition BNO08x.hpp:397
uint8_t activity_classifier
BNO08xActivity status reading (See SH-2 Ref. Manual 6.5.36)
Definition BNO08x.hpp:410
uint16_t raw_accel_X
Definition BNO08x.hpp:392
uint16_t raw_quat_K
Definition BNO08x.hpp:397
uint16_t raw_quat_real
Definition BNO08x.hpp:397
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
uint16_t raw_calib_gyro_X
Definition BNO08x.hpp:396
uint16_t raw_bias_X
Definition BNO08x.hpp:403
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
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
uint16_t mems_raw_accel_X
Definition BNO08x.hpp:413
esp_err_t init_hint_isr()
Initializes host interrupt ISR.
Definition BNO08x.cpp:321
uint16_t raw_magf_X
Definition BNO08x.hpp:405
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
uint16_t mems_raw_magf_Y
Definition BNO08x.hpp:417
uint16_t raw_magf_Z
Definition BNO08x.hpp:405
uint16_t raw_accel_Y
Definition BNO08x.hpp:392
uint16_t mems_raw_magf_X
Definition BNO08x.hpp:417
uint16_t mems_raw_gyro_Y
Definition BNO08x.hpp:415
uint16_t raw_lin_accel_Z
Definition BNO08x.hpp:394
uint32_t time_stamp
Report timestamp (see datasheet 1.3.5.3)
Definition BNO08x.hpp:391
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
uint16_t mems_raw_gyro_Z
Raw gyro readings from MEMS sensor (See SH-2 Ref. Manual 6.5.12)
Definition BNO08x.hpp:416
uint16_t raw_bias_Y
Definition BNO08x.hpp:403
uint16_t magf_accuracy
Calibrated magnetic field reading in uTesla (See SH-2 Ref. Manual 6.5.16)
Definition BNO08x.hpp:406
uint16_t raw_uncalib_gyro_Y
Definition BNO08x.hpp:403
uint16_t raw_magf_Y
Definition BNO08x.hpp:405
uint16_t integrated_gyro_velocity_Z
Raw gyro angular velocity reading from integrated gyro rotation vector (See SH-2 Ref....
Definition BNO08x.hpp:400
uint16_t step_count
Step counter reading (See SH-2 Ref. Manual 6.5.29)
Definition BNO08x.hpp:408
uint16_t mems_raw_accel_Y
Definition BNO08x.hpp:413
uint16_t get_step_count()
Get the counted amount of steps.
Definition BNO08x.cpp:3498
uint16_t gravity_accuracy
Gravity reading in m/s^2 (See SH-2 Ref. Manual 6.5.11)
Definition BNO08x.hpp:402
esp_err_t init_gpio()
Initializes required gpio.
Definition BNO08x.cpp:293
uint16_t raw_lin_accel_X
Definition BNO08x.hpp:394
void get_magf(float &x, float &y, float &z, BNO08xAccuracy &accuracy)
Get the full magnetic field vector.
Definition BNO08x.cpp:2745
uint16_t gravity_Y
Definition BNO08x.hpp:401
uint16_t raw_accel_Z
Definition BNO08x.hpp:392
uint16_t gravity_X
Definition BNO08x.hpp:401
uint16_t raw_calib_gyro_Z
Raw gyro reading (See SH-2 Ref. Manual 6.5.13)
Definition BNO08x.hpp:396
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
uint16_t gravity_Z
Definition BNO08x.hpp:401
uint16_t raw_uncalib_gyro_Z
Definition BNO08x.hpp:403
uint16_t raw_uncalib_gyro_X
Definition BNO08x.hpp:403
uint16_t raw_lin_accel_Y
Definition BNO08x.hpp:394
BNO08x unit test helper class.
Definition BNO08xTestHelper.hpp:16
static bno08x_config_t imu_cfg
Definition BNO08xTestHelper.hpp:19
static void print_test_start_banner(const char *TEST_TAG)
Prints test begin banner.
Definition BNO08xTestHelper.hpp:88
static bool calibrated_gyro_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data)
Checks if report_data matches the default states stored within prev_report_data data for respective r...
Definition BNO08xTestHelper.hpp:343
struct BNO08xTestHelper::imu_report_data_t imu_report_data_t
IMU configuration settings passed into constructor.
static bool magnetometer_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data)
Checks if report_data matches the default states stored within prev_report_data data for respective r...
Definition BNO08xTestHelper.hpp:448
static void print_test_end_banner(const char *TEST_TAG)
Prints end begin banner.
Definition BNO08xTestHelper.hpp:100
static BNO08x * test_imu
Definition BNO08xTestHelper.hpp:18
static bool gravity_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data)
Checks if report_data matches the default states stored within prev_report_data data for respective r...
Definition BNO08xTestHelper.hpp:421
static BNO08x * get_test_imu()
Deletes test IMU calling deconstructor and releases heap allocated memory.
Definition BNO08xTestHelper.hpp:162
static esp_err_t call_init_gpio()
Used to call private BNO08x::init_gpio() member for tests.
Definition BNO08xTestHelper.hpp:185
static void create_test_imu()
Calls BNO08x constructor and creates new test IMU on heap.
Definition BNO08xTestHelper.hpp:135
static esp_err_t call_init_config_args()
Used to call private BNO08x::init_config_args() member for tests.
Definition BNO08xTestHelper.hpp:172
static esp_err_t call_init_spi()
Used to call private BNO08x::init_spi() member for tests.
Definition BNO08xTestHelper.hpp:211
static void print_test_msg(const char *TEST_TAG, const char *msg)
Prints a message during a test.
Definition BNO08xTestHelper.hpp:113
static esp_err_t call_init_hint_isr()
Used to call private BNO08x::init_hint_isr() member for tests.
Definition BNO08xTestHelper.hpp:198
static const char * BNO08xAccuracy_to_str(BNO08xAccuracy accuracy)
Converts BNO08xAccuracy enum class object to string.
Definition BNO08xTestHelper.hpp:628
static bool stability_classifier_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data)
Checks if report_data matches the default states stored within prev_report_data data for respective r...
Definition BNO08xTestHelper.hpp:493
static void set_test_imu_cfg(bno08x_config_t cfg)
Set test imu configuration used with create_test_imu()
Definition BNO08xTestHelper.hpp:125
static const constexpr char * TAG
Definition BNO08xTestHelper.hpp:21
static bool step_counter_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data)
Checks if report_data matches the default states stored within prev_report_data data for respective r...
Definition BNO08xTestHelper.hpp:475
static bool gyro_integrated_rotation_vector_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data)
Checks if report_data matches the default states stored within prev_report_data data for respective r...
Definition BNO08xTestHelper.hpp:274
static void update_report_data(imu_report_data_t *report_data)
Updates report data with calls relevant test_imu methods.
Definition BNO08xTestHelper.hpp:528
static const char * BNO08xActivity_to_str(BNO08xActivity activity)
Converts BNO08xActivity enum class object to string.
Definition BNO08xTestHelper.hpp:676
static bool linear_accelerometer_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data)
Checks if report_data matches the default states stored within prev_report_data data for respective r...
Definition BNO08xTestHelper.hpp:394
static bool uncalibrated_gyro_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data)
Checks if report_data matches the default states stored within prev_report_data data for respective r...
Definition BNO08xTestHelper.hpp:310
static void reset_all_imu_data_to_test_defaults()
Resets internal test imu data with test defaults.
Definition BNO08xTestHelper.hpp:554
static bool accelerometer_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data)
Checks if report_data matches the default states stored within prev_report_data data for respective r...
Definition BNO08xTestHelper.hpp:367
static esp_err_t call_launch_tasks()
Used to call private BNO08x::launch_tasks() member for tests.
Definition BNO08xTestHelper.hpp:224
static void destroy_test_imu()
Deletes test IMU calling deconstructor and releases heap allocated memory.
Definition BNO08xTestHelper.hpp:148
static const char * BNO08xStability_to_str(BNO08xStability stability)
Converts BNO08xStability enum class object to string.
Definition BNO08xTestHelper.hpp:652
static bool rotation_vector_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data)
Checks if report_data matches the default states stored within prev_report_data data for respective r...
Definition BNO08xTestHelper.hpp:240
static bool activity_classifier_data_is_new(imu_report_data_t *report_data, imu_report_data_t *default_report_data)
Checks if report_data matches the default states stored within prev_report_data data for respective r...
Definition BNO08xTestHelper.hpp:511
IMU configuration settings passed into constructor.
Definition BNO08xTestHelper.hpp:26
BNO08xActivity activity_classifier
Definition BNO08xTestHelper.hpp:77
float integrated_gyro_vel_x
Definition BNO08xTestHelper.hpp:36
BNO08xAccuracy magf_accuracy
Definition BNO08xTestHelper.hpp:69
float magf_x
Definition BNO08xTestHelper.hpp:66
float grav_y
Definition BNO08xTestHelper.hpp:51
float integrated_gyro_vel_z
Definition BNO08xTestHelper.hpp:38
float quat_J
Definition BNO08xTestHelper.hpp:30
float uncalib_gyro_drift_z
Definition BNO08xTestHelper.hpp:64
float uncalib_gyro_vel_x
Definition BNO08xTestHelper.hpp:59
float uncalib_gyro_drift_y
Definition BNO08xTestHelper.hpp:63
float lin_accel_x
Definition BNO08xTestHelper.hpp:45
float quat_K
Definition BNO08xTestHelper.hpp:31
BNO08xAccuracy lin_accel_accuracy
Definition BNO08xTestHelper.hpp:48
float magf_z
Definition BNO08xTestHelper.hpp:68
float lin_accel_y
Definition BNO08xTestHelper.hpp:46
float lin_accel_z
Definition BNO08xTestHelper.hpp:47
float accel_x
Definition BNO08xTestHelper.hpp:40
BNO08xAccuracy grav_accuracy
Definition BNO08xTestHelper.hpp:53
float calib_gyro_vel_z
Definition BNO08xTestHelper.hpp:57
float accel_y
Definition BNO08xTestHelper.hpp:41
uint16_t raw_mems_gyro_y
Definition BNO08xTestHelper.hpp:72
float quat_real
Definition BNO08xTestHelper.hpp:32
BNO08xStability stability_classifier
Definition BNO08xTestHelper.hpp:76
float magf_y
Definition BNO08xTestHelper.hpp:67
float calib_gyro_vel_x
Definition BNO08xTestHelper.hpp:55
float quat_I
Definition BNO08xTestHelper.hpp:29
uint16_t raw_mems_gyro_x
Definition BNO08xTestHelper.hpp:71
uint16_t raw_mems_gyro_z
Definition BNO08xTestHelper.hpp:73
BNO08xAccuracy quat_accuracy
Definition BNO08xTestHelper.hpp:34
float uncalib_gyro_vel_z
Definition BNO08xTestHelper.hpp:61
BNO08xAccuracy accel_accuracy
Definition BNO08xTestHelper.hpp:43
float uncalib_gyro_drift_x
Definition BNO08xTestHelper.hpp:62
float grav_x
Definition BNO08xTestHelper.hpp:50
float uncalib_gyro_vel_y
Definition BNO08xTestHelper.hpp:60
float quat_radian_accuracy
Definition BNO08xTestHelper.hpp:33
uint32_t time_stamp
Definition BNO08xTestHelper.hpp:27
uint16_t step_count
Definition BNO08xTestHelper.hpp:75
float accel_z
Definition BNO08xTestHelper.hpp:42
float grav_z
Definition BNO08xTestHelper.hpp:52
float integrated_gyro_vel_y
Definition BNO08xTestHelper.hpp:37
float calib_gyro_vel_y
Definition BNO08xTestHelper.hpp:56
IMU configuration settings passed into constructor.
Definition BNO08x_global_types.hpp:74