ekf2: publish flow vel only if compensated flow is available

- fix a few publication timestamp_samples
This commit is contained in:
Daniel Agar
2022-02-14 10:55:10 -05:00
parent b157afde6a
commit 5370733d62
3 changed files with 41 additions and 33 deletions
+3
View File
@@ -410,7 +410,10 @@ void Ekf::controlOpticalFlowFusion()
} else {
// don't use this flow data and wait for the next data to arrive
_flow_data_ready = false;
_flow_compensated_XY_rad.setZero();
}
} else {
_flow_compensated_XY_rad.setZero();
}
// New optical flow data is available and is ready to be fused when the midpoint of the sample falls behind the fusion time horizon