forked from Archive/PX4-Autopilot
failure detector: fix imbalanced prop metric time interval
This commit is contained in:
parent
89b81b0bd6
commit
eb80e0410c
|
@ -324,7 +324,7 @@ void FailureDetector::updateImbalancedPropStatus()
|
|||
|
||||
if ((imu_status.accel_device_id != 0)
|
||||
&& (imu_status.accel_device_id == _selected_accel_device_id)) {
|
||||
const float dt = math::constrain((float)(imu_status.timestamp - _imu_status_timestamp_prev), 0.01f, 1.f);
|
||||
const float dt = math::constrain(float(imu_status.timestamp - _imu_status_timestamp_prev) / 1_s, 0.01f, 1.f);
|
||||
_imu_status_timestamp_prev = imu_status.timestamp;
|
||||
|
||||
_imbalanced_prop_lpf.setParameters(dt, _imbalanced_prop_lpf_time_constant);
|
||||
|
|
Loading…
Reference in New Issue