Skip to content

Commit da752c9

Browse files
kamilritzbresch
authored andcommitted
Hot flow fusion fix
1 parent ee859e0 commit da752c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

EKF/control.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ void Ekf::controlOpticalFlowFusion()
540540
if (_flow_data_ready && (_imu_sample_delayed.time_us > _flow_sample_delayed.time_us - uint32_t(1e6f * _flow_sample_delayed.dt) / 2)) {
541541
// Fuse optical flow LOS rate observations into the main filter only if height above ground has been updated recently
542542
// but use a relaxed time criteria to enable it to coast through bad range finder data
543-
if (_control_status.flags.opt_flow && isTimedOut(_time_last_hagl_fuse, (uint64_t)10e6)) {
543+
if (_control_status.flags.opt_flow && isRecent(_time_last_hagl_fuse, (uint64_t)10e6)) {
544544
fuseOptFlow();
545545
_last_known_posNE(0) = _state.pos(0);
546546
_last_known_posNE(1) = _state.pos(1);

0 commit comments

Comments
 (0)