ekf2: move stopFlowFusion() to optical_flow_control.cpp

This commit is contained in:
Daniel Agar 2023-02-21 11:08:03 -05:00
parent 3a317ec18c
commit c20e4e4421
2 changed files with 10 additions and 10 deletions

View File

@ -1188,16 +1188,6 @@ void Ekf::stopAuxVelFusion()
resetEstimatorAidStatus(_aid_src_aux_vel);
}
void Ekf::stopFlowFusion()
{
if (_control_status.flags.opt_flow) {
ECL_INFO("stopping optical flow fusion");
_control_status.flags.opt_flow = false;
resetEstimatorAidStatus(_aid_src_optical_flow);
}
}
void Ekf::resetQuatStateYaw(float yaw, float yaw_variance)
{
// save a copy of the quaternion state for later use in calculating the amount of reset change

View File

@ -258,3 +258,13 @@ void Ekf::resetOnGroundMotionForOpticalFlowChecks()
_time_bad_motion_us = 0;
_time_good_motion_us = _time_delayed_us;
}
void Ekf::stopFlowFusion()
{
if (_control_status.flags.opt_flow) {
ECL_INFO("stopping optical flow fusion");
_control_status.flags.opt_flow = false;
resetEstimatorAidStatus(_aid_src_optical_flow);
}
}