HF-BNO08x  0.1.0-dev
Loading...
Searching...
No Matches
bno08x.hpp File Reference

High-level C++ driver for the BNO08x 9-axis IMU family. More...

#include "bno08x_comm_interface.hpp"
#include "bno08x_version.h"
#include "dfu/HcBin.h"
#include <array>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <functional>
#include "sh2/sh2.h"
#include "sh2/sh2_SensorValue.h"
#include "sh2/sh2_err.h"
#include "../src/bno08x.ipp"
Include dependency graph for bno08x.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Vector3
 Three-axis vector with sensor accuracy indicator. More...
 
struct  Quaternion
 Unit quaternion with sensor accuracy indicator. More...
 
struct  TapEvent
 Tap detector event details. More...
 
struct  RawVector3
 Raw integer 3-axis sample (ADC counts) with optional metadata. More...
 
struct  ActivityClassifierEvent
 Personal activity classifier payload. More...
 
struct  RawOpticalFlowEvent
 Raw optical flow payload from SH2_RAW_OPTICAL_FLOW. More...
 
struct  DeadReckoningPoseEvent
 Dead reckoning position/orientation/velocity payload. More...
 
struct  WheelEncoderEvent
 Wheel encoder payload. More...
 
struct  SensorEvent
 Container for a single decoded SH-2 sensor report. More...
 
struct  RvcSensorEvent
 Raw RVC frame data in integer fixed-point format. More...
 
struct  RvcSensorValue
 Decoded RVC frame data in floating-point natural units. More...
 
struct  DfuProgress
 Progress sample emitted during DFU transfers. More...
 
struct  DfuOptions
 Controls DFU validation and transfer behavior. More...
 
struct  DfuMemoryImage
 Firmware image descriptor for class-aware memory DFU. More...
 
class  BNO085< CommType >
 Unified driver for the BNO08x IMU – SH-2 mode, RVC mode, and DFU. More...
 

Macros

#define BNO085_HEADER_INCLUDED
 

Typedefs

using SensorCallback = std::function<void(const SensorEvent&)>
 Callback invoked when a new SH-2 sensor event is received.
 
using RvcCallback = std::function<void(const RvcSensorValue&)>
 Callback invoked when a decoded RVC frame is available.
 
using DfuProgressCallback = std::function<void(const DfuProgress&)>
 Callback for DFU progress updates.
 

Enumerations

enum class  BNO085Sensor : uint8_t {
  BNO085Sensor::Accelerometer = 0x01 , BNO085Sensor::Gyroscope = 0x02 , BNO085Sensor::Magnetometer = 0x03 , BNO085Sensor::LinearAcceleration = 0x04 ,
  BNO085Sensor::RotationVector = 0x05 , BNO085Sensor::Gravity = 0x06 , BNO085Sensor::GyroUncalibrated = 0x07 , BNO085Sensor::GameRotationVector = 0x08 ,
  BNO085Sensor::GeomagneticRotationVector = 0x09 , BNO085Sensor::Pressure = 0x0A , BNO085Sensor::AmbientLight = 0x0B , BNO085Sensor::Humidity = 0x0C ,
  BNO085Sensor::Proximity = 0x0D , BNO085Sensor::Temperature = 0x0E , BNO085Sensor::MagneticFieldUncalibrated = 0x0F , BNO085Sensor::TapDetector = 0x10 ,
  BNO085Sensor::StepCounter = 0x11 , BNO085Sensor::SignificantMotion = 0x12 , BNO085Sensor::StabilityClassifier = 0x13 , BNO085Sensor::RawAccelerometer = 0x14 ,
  BNO085Sensor::RawGyroscope = 0x15 , BNO085Sensor::RawMagnetometer = 0x16 , BNO085Sensor::StepDetector = 0x18 , BNO085Sensor::ShakeDetector = 0x19 ,
  BNO085Sensor::FlipDetector = 0x1A , BNO085Sensor::PickupDetector = 0x1B , BNO085Sensor::StabilityDetector = 0x1C , BNO085Sensor::PersonalActivityClassifier = 0x1E ,
  BNO085Sensor::SleepDetector = 0x1F , BNO085Sensor::TiltDetector = 0x20 , BNO085Sensor::PocketDetector = 0x21 , BNO085Sensor::CircleDetector = 0x22 ,
  BNO085Sensor::HeartRateMonitor = 0x23 , BNO085Sensor::ARVRStabilizedRV = 0x28 , BNO085Sensor::ARVRStabilizedGameRV = 0x29 , BNO085Sensor::GyroIntegratedRV = 0x2A ,
  BNO085Sensor::IZroMotionRequest = 0x2B , BNO085Sensor::RawOpticalFlow = 0x2C , BNO085Sensor::DeadReckoningPose = 0x2D , BNO085Sensor::WheelEncoder = 0x2E
}
 Identifiers for all SH-2 sensor reports supported by the BNO08x. More...
 
enum class  BNO085DriverState : uint8_t { BNO085DriverState::Closed = 0 , BNO085DriverState::Sh2Active , BNO085DriverState::RvcActive , BNO085DriverState::DfuInProgress }
 Current top-level operating state of the driver. More...
 

Functions

const char * GetBNO08xDriverVersion () noexcept
 Get the BNO08x driver version string (free function).
 

Variables

const HcBin_t firmware
 Default compiled-in firmware image for DFU.
 

Detailed Description

High-level C++ driver for the BNO08x 9-axis IMU family.

Macro Definition Documentation

◆ BNO085_HEADER_INCLUDED

#define BNO085_HEADER_INCLUDED

Function Documentation

◆ GetBNO08xDriverVersion()

const char * GetBNO08xDriverVersion ( )
inlinenoexcept

Get the BNO08x driver version string (free function).

Variable Documentation

◆ firmware

const HcBin_t firmware
extern

Default compiled-in firmware image for DFU.

Defined in firmware-bno.c. Contains a stub by default; replace with a real BNO08x firmware binary for production DFU. Alternatively, use MemoryFirmware for runtime-provided images.