ekf2: do not store delayed baro sample in class

the sample is popped from the buffer and directly used; there is no
need to keep a local copy of it
This commit is contained in:
bresch
2022-09-10 12:29:29 -04:00
committed by Daniel Agar
parent ae1e12a6b5
commit 6bd81c0eb7
3 changed files with 2 additions and 28 deletions
+1 -1
View File
@@ -769,7 +769,7 @@ void EKF2::PublishBaroBias(const hrt_abstime &timestamp)
const BiasEstimator::status &status = _ekf.getBaroBiasEstimatorStatus();
if (fabsf(status.bias - _last_baro_bias_published) > 0.001f) {
_estimator_baro_bias_pub.publish(fillEstimatorBiasMsg(status, _ekf.get_baro_sample_delayed().time_us, timestamp,
_estimator_baro_bias_pub.publish(fillEstimatorBiasMsg(status, _ekf.aid_src_baro_hgt().timestamp_sample, timestamp,
_device_id_baro));
_last_baro_bias_published = status.bias;