Skip to content

Commit

Permalink
sensors/vehicle_imu: don't bother checking IMU_GYRO_RATEMAX
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Jun 7, 2022
1 parent 0bddca6 commit beaebe4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions src/modules/sensors/vehicle_imu/VehicleIMU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,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::min(_param_imu_gyro_ratemax.get(), (int32_t) 1000));
const int32_t imu_integration_rate_hz = constrain(_param_imu_integ_rate.get(), (int32_t)50, (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);
Expand Down
1 change: 0 additions & 1 deletion src/modules/sensors/vehicle_imu/VehicleIMU.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ class VehicleIMU : public ModuleParams, public px4::ScheduledWorkItem

DEFINE_PARAMETERS(
(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
)
};
Expand Down

0 comments on commit beaebe4

Please sign in to comment.