mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 15:28:53 +08:00
VehicleIMU: move setting of _notify_clipping from constructor to ParametersUpdate()
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
Daniel Agar
parent
ea1a6a327c
commit
f9c4c8b22c
@@ -69,9 +69,6 @@ VehicleIMU::VehicleIMU(int instance, uint8_t accel_index, uint8_t gyro_index, co
|
||||
// schedule conservatively until the actual accel & gyro rates are known
|
||||
_sensor_gyro_sub.set_required_updates(sensor_gyro_s::ORB_QUEUE_LENGTH / 2);
|
||||
#endif
|
||||
|
||||
_notify_clipping = _param_sens_imu_notify_clipping.get();
|
||||
|
||||
// advertise immediately to ensure consistent ordering
|
||||
_vehicle_imu_pub.advertise();
|
||||
_vehicle_imu_status_pub.advertise();
|
||||
@@ -127,6 +124,8 @@ bool VehicleIMU::ParametersUpdate(bool force)
|
||||
_accel_calibration.ParametersUpdate();
|
||||
_gyro_calibration.ParametersUpdate();
|
||||
|
||||
_notify_clipping = _param_sens_imu_notify_clipping.get();
|
||||
|
||||
if (accel_calibration_count != _accel_calibration.calibration_count()) {
|
||||
// if calibration changed reset any existing learned calibration
|
||||
_accel_cal_available = false;
|
||||
|
||||
Reference in New Issue
Block a user