EKF: Remove unnecessary code

_flt_mag_align_start_time is set on initial alignment and will always be >0 before this check can run
This commit is contained in:
Paul Riseborough 2019-03-30 13:46:16 +11:00 committed by Paul Riseborough
parent 43b5e26fe4
commit f97f0b6ea3
1 changed files with 1 additions and 1 deletions

View File

@ -1533,7 +1533,7 @@ void Ekf::controlMagFusion()
}
} else if (_params.mag_fusion_type == MAG_FUSE_TYPE_3D) {
if (!_control_status.flags.mag_3D && _control_status.flags.yaw_align && (_flt_mag_align_start_time > 0)) {
if (!_control_status.flags.mag_3D && _control_status.flags.yaw_align) {
// only commence 3-axis fusion when yaw is aligned and field states set
_control_status.flags.mag_3D = true;
}