mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
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
|
// update calculated values of dynamic parameters - runs at 1Hz
|
||||||
void AP_GyroFFT::update_parameters(bool force)
|
void AP_GyroFFT::update_parameters(bool force)
|
||||||
{
|
{
|
||||||
// lock contention is very costly, so don't allow configuration updates while flying
|
if (!_initialized && !force) {
|
||||||
if ((!_initialized || AP::arming().is_armed()) && !force) {
|
|
||||||
return;
|
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);
|
WITH_SEMAPHORE(_sem);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user