mirror of https://github.com/ArduPilot/ardupilot
AP_GyroFFT: correct compilation when AP_Arming is not compiled in
This commit is contained in:
parent
7e4d9f2893
commit
43a4160487
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue