Skip to content

Commit

Permalink
addressed review comment
Browse files Browse the repository at this point in the history
Signed-off-by: Roman <bapstroman@gmail.com>
  • Loading branch information
RomanBapst authored and priseborough committed Nov 12, 2018
1 parent a74b7ef commit 68a3cbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EKF/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1495,11 +1495,11 @@ void Ekf::controlMagFusion()
} else if (_params.mag_fusion_type == MAG_FUSE_TYPE_3D) {
// if transitioning into 3-axis fusion mode, we need to initialise the yaw angle and field states
if (!_control_status.flags.mag_3D || !_flt_mag_align_complete) {
_flt_mag_align_complete= resetMagHeading(_mag_sample_delayed.mag);
_flt_mag_align_complete = resetMagHeading(_mag_sample_delayed.mag);
_control_status.flags.yaw_align = _control_status.flags.yaw_align || _flt_mag_align_complete;
}

// always use 3-axis mag fusion
// use 3-axis mag fusion if reset was successful
_control_status.flags.mag_3D = _flt_mag_align_complete;
_control_status.flags.mag_hdg = false;

Expand Down

0 comments on commit 68a3cbc

Please # to comment.