|
Robot Control Library
|
configuration of the mpu sensor More...
#include <rc/mpu.h>
Data Fields | |
physical connection configuration | |
| int | gpio_interrupt_pin_chip |
| gpio pin, default 3 on Robotics Cape and BB Blue More... | |
| int | gpio_interrupt_pin |
| gpio pin, default 21 on Robotics Cape and BB Blue More... | |
| int | i2c_bus |
| which bus to use, default 2 on Robotics Cape and BB Blue More... | |
| uint8_t | i2c_addr |
| default is 0x68, pull pin ad0 high to make it 0x69 More... | |
| int | show_warnings |
| set to 1 to print i2c_bus warnings for debug More... | |
accelerometer, gyroscope, and magnetometer configuration | |
| rc_mpu_accel_fsr_t | accel_fsr |
| accelerometer full scale range, default ACCEL_FSR_8G More... | |
| rc_mpu_gyro_fsr_t | gyro_fsr |
| gyroscope full scale range, default GYRO_FSR_2000DPS More... | |
| rc_mpu_accel_dlpf_t | accel_dlpf |
| internal low pass filter cutoff, default ACCEL_DLPF_184 More... | |
| rc_mpu_gyro_dlpf_t | gyro_dlpf |
| internal low pass filter cutoff, default GYRO_DLPF_184 More... | |
| int | enable_magnetometer |
| magnetometer use is optional, set to 1 to enable, default 0 (off) More... | |
DMP settings, only used with DMP mode | |
| int | dmp_sample_rate |
| sample rate in hertz, 200,100,50,40,25,20,10,8,5,4 More... | |
| int | dmp_fetch_accel_gyro |
| set to 1 to optionally raw accel/gyro when reading DMP quaternion, default: 0 (off) More... | |
| int | dmp_auto_calibrate_gyro |
| set to 1 to let DMP auto calibrate the gyro while in use, default: 0 (off) More... | |
| rc_mpu_orientation_t | orient |
| DMP orientation matrix, see rc_mpu_orientation_t. More... | |
| double | compass_time_constant |
| time constant (seconds) for filtering compass with gyroscope yaw value, default 25 More... | |
| int | dmp_interrupt_sched_policy |
| Scheduler policy for DMP interrupt handler and user callback, default SCHED_OTHER. More... | |
| int | dmp_interrupt_priority |
| scheduler priority for DMP interrupt handler and user callback, default 0 More... | |
| int | read_mag_after_callback |
| reads magnetometer after DMP callback function to improve latency, default 1 (true) More... | |
| int | mag_sample_rate_div |
| magnetometer_sample_rate = dmp_sample_rate/mag_sample_rate_div, default: 4 More... | |
| int | tap_threshold |
| threshold impulse for triggering a tap in units of mg/ms More... | |
configuration of the mpu sensor
Configuration struct passed to rc_mpu_initialize and rc_mpu_initialize_dmp. It is best to get the default config with rc_mpu_default_config() function first and modify from there.
| int gpio_interrupt_pin_chip |
gpio pin, default 3 on Robotics Cape and BB Blue
| int gpio_interrupt_pin |
gpio pin, default 21 on Robotics Cape and BB Blue
| int i2c_bus |
which bus to use, default 2 on Robotics Cape and BB Blue
| uint8_t i2c_addr |
default is 0x68, pull pin ad0 high to make it 0x69
| int show_warnings |
set to 1 to print i2c_bus warnings for debug
| rc_mpu_accel_fsr_t accel_fsr |
accelerometer full scale range, default ACCEL_FSR_8G
| rc_mpu_gyro_fsr_t gyro_fsr |
gyroscope full scale range, default GYRO_FSR_2000DPS
| rc_mpu_accel_dlpf_t accel_dlpf |
internal low pass filter cutoff, default ACCEL_DLPF_184
| rc_mpu_gyro_dlpf_t gyro_dlpf |
internal low pass filter cutoff, default GYRO_DLPF_184
| int enable_magnetometer |
magnetometer use is optional, set to 1 to enable, default 0 (off)
| int dmp_sample_rate |
sample rate in hertz, 200,100,50,40,25,20,10,8,5,4
| int dmp_fetch_accel_gyro |
set to 1 to optionally raw accel/gyro when reading DMP quaternion, default: 0 (off)
| int dmp_auto_calibrate_gyro |
set to 1 to let DMP auto calibrate the gyro while in use, default: 0 (off)
| rc_mpu_orientation_t orient |
DMP orientation matrix, see rc_mpu_orientation_t.
| double compass_time_constant |
time constant (seconds) for filtering compass with gyroscope yaw value, default 25
| int dmp_interrupt_sched_policy |
Scheduler policy for DMP interrupt handler and user callback, default SCHED_OTHER.
| int dmp_interrupt_priority |
scheduler priority for DMP interrupt handler and user callback, default 0
| int read_mag_after_callback |
reads magnetometer after DMP callback function to improve latency, default 1 (true)
| int mag_sample_rate_div |
magnetometer_sample_rate = dmp_sample_rate/mag_sample_rate_div, default: 4
| int tap_threshold |
threshold impulse for triggering a tap in units of mg/ms