From 29655d149c6ebba115a1c99d2f5984b31a5c7a06 Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Thu, 23 Jan 2025 11:36:33 +0000 Subject: [PATCH] AP_InertialSensor: remove changes to primary accel since it is always the same as the gyro --- libraries/AP_InertialSensor/AP_InertialSensor.cpp | 15 ++++----------- libraries/AP_InertialSensor/AP_InertialSensor.h | 10 ++++------ .../AP_InertialSensor_Backend.cpp | 8 ++++---- .../AP_InertialSensor_Logging.cpp | 2 +- 4 files changed, 13 insertions(+), 22 deletions(-) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor.cpp b/libraries/AP_InertialSensor/AP_InertialSensor.cpp index b1a5d6d866e9e..25ff1dcc0fcc0 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor.cpp @@ -1891,14 +1891,10 @@ void AP_InertialSensor::HarmonicNotch::update_params(uint8_t instance, bool conv } #endif -// notify IMUs of the new primaries -void AP_InertialSensor::set_primary_gyro(uint8_t instance) +// notify IMUs of the new primary +void AP_InertialSensor::set_primary(uint8_t instance) { - _primary_gyro = instance; -} -void AP_InertialSensor::set_primary_accel(uint8_t instance) -{ - _primary_accel = instance; + _primary = instance; } /* @@ -1974,7 +1970,7 @@ void AP_InertialSensor::update(void) if (_gyro_healthy[i] && _use(i)) { _first_usable_gyro = i; #if !AP_AHRS_ENABLED - _primary_gyro = _first_usable_gyro; + _primary = _first_usable_gyro; #endif break; } @@ -1982,9 +1978,6 @@ void AP_InertialSensor::update(void) for (uint8_t i=0; i