mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 01:43:34 +08:00
Set maximum publishing rate to match MPU6000
The integrators were set to publish at 800Hz which was overwhelming the CPU with the EKF running. This brings them in line with what we get from the MPU6k device.
This commit is contained in:
@@ -55,8 +55,8 @@ BMI160::BMI160(int bus, const char *path_accel, const char *path_gyro, spi_dev_e
|
||||
_gyro_filter_x(BMI160_GYRO_DEFAULT_RATE, BMI160_GYRO_DEFAULT_DRIVER_FILTER_FREQ),
|
||||
_gyro_filter_y(BMI160_GYRO_DEFAULT_RATE, BMI160_GYRO_DEFAULT_DRIVER_FILTER_FREQ),
|
||||
_gyro_filter_z(BMI160_GYRO_DEFAULT_RATE, BMI160_GYRO_DEFAULT_DRIVER_FILTER_FREQ),
|
||||
_accel_int(1000000 / BMI160_ACCEL_MAX_RATE),
|
||||
_gyro_int(1000000 / BMI160_GYRO_MAX_RATE, true),
|
||||
_accel_int(1000000 / BMI160_ACCEL_MAX_PUBLISH_RATE),
|
||||
_gyro_int(1000000 / BMI160_GYRO_MAX_PUBLISH_RATE, true),
|
||||
_rotation(rotation),
|
||||
_checked_next(0),
|
||||
_last_temperature(0),
|
||||
|
||||
@@ -227,8 +227,10 @@
|
||||
#define BMI160_GYRO_DEFAULT_RANGE_DPS 2000
|
||||
#define BMI160_ACCEL_DEFAULT_RATE 800
|
||||
#define BMI160_ACCEL_MAX_RATE 1600
|
||||
#define BMI160_ACCEL_MAX_PUBLISH_RATE 280
|
||||
#define BMI160_GYRO_DEFAULT_RATE 800
|
||||
#define BMI160_GYRO_MAX_RATE 3200
|
||||
#define BMI160_GYRO_MAX_PUBLISH_RATE BMI160_ACCEL_MAX_PUBLISH_RATE
|
||||
|
||||
#define BMI160_ACCEL_DEFAULT_ONCHIP_FILTER_FREQ 324
|
||||
#define BMI160_ACCEL_DEFAULT_DRIVER_FILTER_FREQ 50
|
||||
|
||||
Reference in New Issue
Block a user