M5Unit-IMU 0.0.2 git rev:e5b00aa
Loading...
Searching...
No Matches
m5::unit::bmi270::Data Struct Reference

One measurement. Accel/gyro are always 12 bytes, little-endian (register 0x0C when the AUX/BMM150 bridge is not in use, or bytes [8..19] of the 20 byte burst from register 0x04 when it is; see UnitBMI270::read_measurement()) More...

#include <unit_bmi270_data.hpp>

Public Member Functions

Raw ADC values (little-endian)
int16_t accel_x () const
 Raw accelerometer X.
 
int16_t accel_y () const
 Raw accelerometer Y.
 
int16_t accel_z () const
 Raw accelerometer Z.
 
int16_t gyro_x () const
 Raw gyroscope X.
 
int16_t gyro_y () const
 Raw gyroscope Y.
 
int16_t gyro_z () const
 Raw gyroscope Z.
 

Public Attributes

std::array< uint8_t, 12 > raw {}
 [0..5] accel XYZ, [6..11] gyro XYZ
 
bmm150::Data mag {}
 AUX (on-chip BMM150) magnetometer sample, valid only when aux_mag is true. Reuses bmm150::Data's bit-packing and trim compensation (comp_x()/comp_y()/comp_z()) so the AUX path and the standalone UnitBMM150 path share identical math.
 
bool aux_mag {false}
 True if mag holds a sample from the AUX (BMM150) bridge.
 

Detailed Description

One measurement. Accel/gyro are always 12 bytes, little-endian (register 0x0C when the AUX/BMM150 bridge is not in use, or bytes [8..19] of the 20 byte burst from register 0x04 when it is; see UnitBMI270::read_measurement())