Skyward boardcore
|
#include <BMX160Config.h>
Public Types | |
enum class | FifoMode { DISABLED , HEADERLESS , HEADER } |
Fifo operationg mode. More... | |
enum class | FifoInterruptPin { DISABLED , PIN_INT1 , PIN_INT2 } |
Fifo interrupt mode. More... | |
enum class | AccelerometerRange { G_2 = 0x3 , G_4 = 0x5 , G_8 = 0x8 , G_16 = 0xC } |
Range of the accelerometer expressed in ±g. More... | |
enum class | GyroscopeRange { DEG_2000 = 0x0 , DEG_1000 = 0x1 , DEG_500 = 0x2 , DEG_250 = 0x3 , DEG_125 = 0x4 } |
Gyroscope range expressed in °/sec. More... | |
enum class | GyroscopeMeasureUnit { DEG , RAD } |
Gyroscope measure unit (degrees or radiants). More... | |
enum class | OutputDataRate { HZ_0_78125 = 0x01 , HZ_1_5625 = 0x02 , HZ_3_125 = 0x03 , HZ_6_25 = 0x04 , HZ_12_5 = 0x05 , HZ_25 = 0x06 , HZ_50 = 0x07 , HZ_100 = 0x08 , HZ_200 = 0x09 , HZ_400 = 0x0A , HZ_800 = 0x0B , HZ_1600 = 0x0C , HZ_3200 = 0x0D } |
Output Data Rate expressed in Hz. More... | |
enum class | BandwidthParameter { NORMAL = 0x20 , OSR2 = 0x10 , OSR4 = 0x00 } |
Bandwidth parameter. More... | |
enum class | IntMode { PUSH_PULL , OPEN_DRAIN } |
Interrupt pin mode. More... | |
Public Member Functions | |
BMX160Config () | |
BMX160 Configuration.
Definition at line 31 of file BMX160Config.h.
|
strong |
Range of the accelerometer expressed in ±g.
Enumerator | |
---|---|
G_2 | Accelaration range ±2g. |
G_4 | Accelaration range ±4g. |
G_8 | Accelaration range ±8g. |
G_16 | Accelaration range ±16g. |
Definition at line 60 of file BMX160Config.h.
|
strong |
Bandwidth parameter.
For more detailed explanation, check the 2.4.1 Data Processing Accelerometer and 2.4.2 Data Processing Gyroscope chapters of the BMX160 datasheet.
Enumerator | |
---|---|
NORMAL | Normal filter operation. |
OSR2 | Oversampling rate of 2. |
OSR4 | Oversampling rate of 4. |
Definition at line 122 of file BMX160Config.h.
|
strong |
Fifo interrupt mode.
Uses fifo full/watermark as triggers. We configure the pin as push-pull and active-low.
Enumerator | |
---|---|
DISABLED | The interrupts are completely disabled. |
PIN_INT1 | Interrupts are enabled on pin 2. |
PIN_INT2 | Interrupts are enabled on pin 1. |
Definition at line 49 of file BMX160Config.h.
|
strong |
Fifo operationg mode.
Enumerator | |
---|---|
DISABLED | The fifo is completely disabled. |
HEADERLESS | Sensors MUST have the same odr. |
HEADER | Sensors can have different odr. |
Definition at line 36 of file BMX160Config.h.
|
strong |
Gyroscope measure unit (degrees or radiants).
Enumerator | |
---|---|
DEG | Degrees. |
RAD | Radiants. |
Definition at line 83 of file BMX160Config.h.
|
strong |
Gyroscope range expressed in °/sec.
Enumerator | |
---|---|
DEG_2000 | Gyroscope range 2000°/sec. |
DEG_1000 | Gyroscope range 1000°/sec. |
DEG_500 | Gyroscope range 500°/sec. |
DEG_250 | Gyroscope range 250°/sec. |
DEG_125 | Gyroscope range 125°/sec. |
Definition at line 71 of file BMX160Config.h.
|
strong |
Interrupt pin mode.
Configuration for interrupt pin behaviour.
Enumerator | |
---|---|
PUSH_PULL | Push-pull behaviour. |
OPEN_DRAIN | Open drain behaviour. |
Definition at line 134 of file BMX160Config.h.
|
strong |
Output Data Rate expressed in Hz.
Limits are as follows (wrong values will error the device):
Definition at line 98 of file BMX160Config.h.
|
inline |
Definition at line 244 of file BMX160Config.h.
BandwidthParameter Boardcore::BMX160Config::accelerometerBandwidth = BandwidthParameter::NORMAL |
Definition at line 231 of file BMX160Config.h.
OutputDataRate Boardcore::BMX160Config::accelerometerDataRate = OutputDataRate::HZ_100 |
Definition at line 230 of file BMX160Config.h.
AccelerometerRange Boardcore::BMX160Config::accelerometerRange = AccelerometerRange::G_2 |
Definition at line 232 of file BMX160Config.h.
bool Boardcore::BMX160Config::enableCompensation = true |
Enable magnetometer data compensation.
The magnetomer support compensation, but it's not documented, and the current implementation is based on the source of the bosch driver.
The implementation is slow, probably buggy, and only god knows what it does, it's so bad that I added a switch to disable it, use it wisely!
Definition at line 194 of file BMX160Config.h.
uint8_t Boardcore::BMX160Config::fifoAccelerationDownsampling = 0 |
Fifo accelerometer downsampling (between 0 and 15).
Definition at line 215 of file BMX160Config.h.
bool Boardcore::BMX160Config::fifoAccelerometerFiltered = true |
Should the fifo use accelerometer filtered data?
Definition at line 210 of file BMX160Config.h.
uint8_t Boardcore::BMX160Config::fifoGyroscopeDownsampling = 0 |
Fifo gyroscope downsampling (between 0 and 15).
Definition at line 225 of file BMX160Config.h.
bool Boardcore::BMX160Config::fifoGyroscopeFiltered = true |
Should the fifo use gyroscope filtered data?
Definition at line 220 of file BMX160Config.h.
FifoInterruptPin Boardcore::BMX160Config::fifoInterrupt = FifoInterruptPin::DISABLED |
Definition at line 228 of file BMX160Config.h.
FifoMode Boardcore::BMX160Config::fifoMode = FifoMode::DISABLED |
Definition at line 227 of file BMX160Config.h.
uint8_t Boardcore::BMX160Config::fifoWatermark = -1 |
Fifo watermark to use, in multiples of 4.
Only values between [0-250] make sense to use. A really high watermark value (the default) will disable it, falling back to FIFO full.
Definition at line 147 of file BMX160Config.h.
BandwidthParameter Boardcore::BMX160Config::gyroscopeBandwidth = BandwidthParameter::NORMAL |
Definition at line 235 of file BMX160Config.h.
OutputDataRate Boardcore::BMX160Config::gyroscopeDataRate = OutputDataRate::HZ_100 |
Definition at line 234 of file BMX160Config.h.
GyroscopeRange Boardcore::BMX160Config::gyroscopeRange = GyroscopeRange::DEG_2000 |
Definition at line 236 of file BMX160Config.h.
GyroscopeMeasureUnit Boardcore::BMX160Config::gyroscopeUnit = GyroscopeMeasureUnit::RAD |
Definition at line 237 of file BMX160Config.h.
IntMode Boardcore::BMX160Config::interrupt1Mode = IntMode::PUSH_PULL |
Definition at line 241 of file BMX160Config.h.
IntMode Boardcore::BMX160Config::interrupt2Mode = IntMode::PUSH_PULL |
Definition at line 242 of file BMX160Config.h.
OutputDataRate Boardcore::BMX160Config::magnetometerRate = OutputDataRate::HZ_100 |
Definition at line 239 of file BMX160Config.h.
uint8_t Boardcore::BMX160Config::magnetometerRepetitionsXY = 0x04 |
Repetitions for the XY axis.
Repetitions represent how many internal samples are averaged in order to get the final outputted sample, these presets are the ones recommended in the BMX160 datasheet, for more informations consult the BMM150 datasheet, chapter 4.2.4 Active mode.
This are the recommended presets:
Definition at line 165 of file BMX160Config.h.
uint8_t Boardcore::BMX160Config::magnetometerRepetitionsZ = 0x0E |
Repetitions for the Z axis.
Repetitions represent how many internal samples are averaged in order to get the final outputted sample, these presets are the ones recommended in the BMX160 datasheet, for more informations consult the BMM150 datasheet, chapter 4.2.4 Active mode.
This are the recommended presets:
Definition at line 183 of file BMX160Config.h.
int Boardcore::BMX160Config::temperatureDivider = 0 |
Divide the temperature sampling rate.
This is used to limit the sampling of the temperature, use 0 to disable it completely.
Every time you call onSimpleUpdate a value is incremented and only if the value is a multiple of this parameter a read is performed.
Definition at line 205 of file BMX160Config.h.