mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-25 08:36:08 +08:00
sensors/vehicle_imu: Fix Integration Rate greater than Gyro Rate (#19318)
This commit is contained in:
@@ -147,7 +147,7 @@ bool VehicleIMU::ParametersUpdate(bool force)
|
||||
|
||||
// constrain IMU integration time 1-20 milliseconds (50-1000 Hz)
|
||||
int32_t imu_integration_rate_hz = constrain(_param_imu_integ_rate.get(),
|
||||
(int32_t)50, math::max(_param_imu_gyro_ratemax.get(), (int32_t) 1000));
|
||||
(int32_t)50, math::min(_param_imu_gyro_ratemax.get(), (int32_t) 1000));
|
||||
|
||||
if (imu_integration_rate_hz != _param_imu_integ_rate.get()) {
|
||||
PX4_WARN("IMU_INTEG_RATE updated %" PRId32 " -> %" PRIu32, _param_imu_integ_rate.get(), imu_integration_rate_hz);
|
||||
|
||||
Reference in New Issue
Block a user