From db14ba46dc3fb1a8e0e87996329d0b93fb480ea5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 17 Apr 2022 17:35:57 +1000 Subject: [PATCH] AP_InertialSensor: call notch param update with semaphore held --- libraries/AP_InertialSensor/AP_InertialSensor.cpp | 9 --------- .../AP_InertialSensor/AP_InertialSensor_Backend.cpp | 10 +++++++++- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor.cpp b/libraries/AP_InertialSensor/AP_InertialSensor.cpp index 99517dbf68..f3e90daf34 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor.cpp @@ -1634,15 +1634,6 @@ void AP_InertialSensor::update(void) for (uint8_t i=0; i<_backend_count; i++) { _backends[i]->update(); } - for (uint8_t i=0; i<_gyro_count; i++) { - const bool converging = AP_HAL::millis() < HAL_INS_CONVERGANCE_MS; - const float gyro_rate = _gyro_raw_sample_rates[i]; - for (auto ¬ch : harmonic_notches) { - if (notch.params.enabled()) { - notch.update_params(i, converging, gyro_rate); - } - } - } if (!_startup_error_counts_set) { for (uint8_t i=0; i