AP_NavEKF3: fixes for new compass API

This commit is contained in:
Andrew Tridgell 2020-05-11 19:38:54 +10:00
parent 17a45b2c44
commit 25b0a113d5
1 changed files with 1 additions and 3 deletions

View File

@ -406,9 +406,7 @@ void NavEKF3_core::InitialiseVariablesMag()
mag_state.DCM.identity();
inhibitMagStates = true;
magStoreIndex = 0;
if (_ahrs->get_compass()) {
magSelectIndex = _ahrs->get_compass()->get_primary();
}
magSelectIndex = 0;
lastMagOffsetsValid = false;
magStateResetRequest = false;
magStateInitComplete = false;