mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +08:00
sensors/vehicle_imu: don't bother checking IMU_GYRO_RATEMAX
This commit is contained in:
@@ -146,8 +146,7 @@ bool VehicleIMU::ParametersUpdate(bool force)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// constrain IMU integration time 1-20 milliseconds (50-1000 Hz)
|
// constrain IMU integration time 1-20 milliseconds (50-1000 Hz)
|
||||||
int32_t imu_integration_rate_hz = constrain(_param_imu_integ_rate.get(),
|
const int32_t imu_integration_rate_hz = constrain(_param_imu_integ_rate.get(), (int32_t)50, (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()) {
|
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);
|
PX4_WARN("IMU_INTEG_RATE updated %" PRId32 " -> %" PRIu32, _param_imu_integ_rate.get(), imu_integration_rate_hz);
|
||||||
|
|||||||
@@ -191,7 +191,6 @@ private:
|
|||||||
|
|
||||||
DEFINE_PARAMETERS(
|
DEFINE_PARAMETERS(
|
||||||
(ParamInt<px4::params::IMU_INTEG_RATE>) _param_imu_integ_rate,
|
(ParamInt<px4::params::IMU_INTEG_RATE>) _param_imu_integ_rate,
|
||||||
(ParamInt<px4::params::IMU_GYRO_RATEMAX>) _param_imu_gyro_ratemax,
|
|
||||||
(ParamBool<px4::params::SENS_IMU_AUTOCAL>) _param_sens_imu_autocal
|
(ParamBool<px4::params::SENS_IMU_AUTOCAL>) _param_sens_imu_autocal
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user