AP_Arming: correct compilation when AP_AHRS_ENABLED is off

e.g. CubeOrange-periph-heavy
This commit is contained in:
Peter Barker 2024-01-11 09:16:57 +11:00 committed by Peter Barker
parent 8b9831dc74
commit 4dd958bdd7
1 changed files with 2 additions and 0 deletions

View File

@ -579,6 +579,7 @@ bool AP_Arming::compass_checks(bool report)
return false;
}
#if AP_AHRS_ENABLED
// if ahrs is using compass and we have location, check mag field versus expected earth magnetic model
Location ahrs_loc;
AP_AHRS &ahrs = AP::ahrs();
@ -597,6 +598,7 @@ bool AP_Arming::compass_checks(bool report)
return false;
}
}
#endif // AP_AHRS_ENABLED
}
return true;