mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 03:04:07 +08:00
addressed review comment
Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
parent
a74b7ef60b
commit
68a3cbc368
@ -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;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user