AP_GyroFFT: correct compilation when AP_Arming is not compiled in

This commit is contained in:
Peter Barker 2024-02-23 19:29:09 +11:00 committed by Andrew Tridgell
parent 7e4d9f2893
commit 43a4160487
1 changed files with 8 additions and 2 deletions

View File

@ -529,10 +529,16 @@ bool AP_GyroFFT::start_analysis() {
// update calculated values of dynamic parameters - runs at 1Hz
void AP_GyroFFT::update_parameters(bool force)
{
// lock contention is very costly, so don't allow configuration updates while flying
if ((!_initialized || AP::arming().is_armed()) && !force) {
if (!_initialized && !force) {
return;
}
#if AP_ARMING_ENABLED
// lock contention is very costly, so don't allow configuration
// updates while flying
if (AP::arming().is_armed() && !force) {
return;
}
#endif
WITH_SEMAPHORE(_sem);