|
| | BNO08x (bno08x_config_t imu_config=bno08x_config_t()) |
| | BNO08x imu constructor. More...
|
| |
| | ~BNO08x () |
| | BNO08x imu deconstructor. More...
|
| |
| bool | initialize () |
| | Initializes BNO08x sensor. More...
|
| |
| bool | hard_reset () |
| | Hard resets BNO08x device. More...
|
| |
| bool | soft_reset () |
| | Soft resets BNO08x device by sending RESET (1) command on "device" channel. More...
|
| |
| bool | disable_all_reports () |
| | Disables all currently enabled reports. More...
|
| |
| BNO08xResetReason | get_reset_reason () |
| | Returns reason for previous reset via product ID report. More...
|
| |
| bool | on () |
| | Places BNO08x device in on state by sending ON (2) command on "device" channel. More...
|
| |
| bool | sleep () |
| | Places BNO08x device in sleep state by sending SLEEP (3) command on "device" channel. More...
|
| |
| bool | dynamic_calibration_enable (BNO08xCalSel sensor) |
| | Starts simple calibration, see ref. manual 6.4.10.1. More...
|
| |
| bool | dynamic_calibration_disable (BNO08xCalSel sensor) |
| | Disables dynamic/motion engine calibration for specified sensor(s), see ref. manual 6.4.6.1. More...
|
| |
| bool | dynamic_calibration_autosave_enable () |
| | Enables the automatic saving of dynamic/ME calibration data to BNO08x internal flash See ref manual 6.4.7.1. More...
|
| |
| bool | dynamic_calibration_autosave_disable () |
| | Disables the automatic saving of dynamic/ME calibration data to BNO08x internal flash See ref manual 6.4.7.1. More...
|
| |
| bool | dynamic_calibration_save () |
| | Saves dynamic/motion engine calibration data to BNO08x internal flash immediately. See ref manual 6.4.5.1. More...
|
| |
| bool | dynamic_calibration_data_clear_ram () |
| | Clears dynamic/motion engine calibration data from ram and resets BNO08x device. See ref manual 6.4.9.1. More...
|
| |
| bool | dynamic_calibration_data_delete () |
| | Deletes dynamic calibration data from BNO08x internal flash and resets the device. Follows the steps outlined in ref. manual 6.4.9. More...
|
| |
| bool | dynamic_calibration_run_routine () |
| | Example calibration routine using dynamic/ME calibration commands. More...
|
| |
| bool | set_system_orientation (float w, float x, float y, float z) |
| | Sets the system orientation of the BNO08x device and persist it in flash (FRS). More...
|
| |
| bool | get_system_orientation (float &w, float &x, float &y, float &z) |
| | Retrieves the system orientation of the BNO08x device and converts to float. More...
|
| |
| bool | get_frs (BNO08xFrsID frs_ID, uint32_t(&data)[16], uint16_t &rx_data_sz) |
| | Retrieves a record from flash record system (if your goal is to retrieve sensor specific meta data use the BNO08xRpt:get_meta_data() method instead) More...
|
| |
| bool | write_frs (BNO08xFrsID frs_ID, uint32_t *data, const uint16_t tx_data_sz) |
| | Writes a record to flash record system. More...
|
| |
| sh2_ProductIds_t | get_product_IDs () |
| | Returns product ID info sent by IMU at initialization. More...
|
| |
| bool | data_available () |
| | Polls for new data/report to become available. More...
|
| |
| bool | register_cb (std::function< void(void)> cb_fxn) |
| | Registers a callback to execute when new data from a report is received. More...
|
| |
| bool | register_cb (std::function< void(uint8_t report_ID)> cb_fxn) |
| | Registers a callback to execute when new data from a report is received, overloaded with callback param for most recent report ID. More...
|
| |
| void | print_product_ids () |
| | Prints product IDs received at initialization. More...
|
| |
| void | print_system_orientation () |
| | Retrieves and prints system orientation. More...
|
| |
| bool BNO08x::dynamic_calibration_enable |
( |
BNO08xCalSel |
sensor | ) |
|
Starts simple calibration, see ref. manual 6.4.10.1.
- Parameters
-
| period_us | This interval should be set to whatever rate the sensor hub is expected to run at after calibration. |
After the calibration is started, the IMU should be rotated 180 degrees. After the IMU has been rotated call calibration_end(). See ref. manual 6.4.10 for more detailed instructions.
- Returns
- True if start simple calibration operation succeeded.
Ends turn-table calibration, see ref. manual 6.4.10.2
- Parameters
-
| status | Returned status bits indicating result of turntable calibration. |
- Returns
- True if enable start turn-table calibration operation succeeded.
Enables dynamic/motion engine calibration for specified sensor(s), see ref. manual 6.4.6.1
- Parameters
-
| sensor | The sensor(s) to enable dynamic/ME calibration for. |
- Returns
- True if enable dynamic/ME calibration succeeded.
| bool BNO08x::dynamic_calibration_run_routine |
( |
| ) |
|
Example calibration routine using dynamic/ME calibration commands.
Routine does the following:alignas
1) disables all enabled reports 2) sends a command to enable dynamic/motion engine calibration for all possible options (SH2_CAL_ACCEL | SH2_CAL_GYRO | SH2_CAL_MAG | SH2_CAL_PLANAR) 3) enables game rotation vector reports and calibrated magnetic field reports 4) moving window average for accuracy received through reports 5) deems calibration accuracy threshold met when magf accuracy avg is >=2 (MED) and quat accuracy avg >=3 (HIGH) for longer than 5 seconds 6) sends command to save dynamic calibration data 7) disables all enabled reports
Note the DCD commands don't have to be used this way, this is just an example, but the dynamic_calibration_autosave_enable() allows calibration to be run and saved constantly even while data is used for other operations.
- Returns
- True if calibration routine succeeded.