From a836bd85831bdf0a07137b9c058f3e1117c2be6a Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 29 Feb 2024 15:39:18 +1100 Subject: [PATCH] AP_AHRS: add and use AP_CUSTOMROTATIONS_ENABLED also add to build_options.py --- libraries/AP_AHRS/AP_AHRS.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_AHRS/AP_AHRS.cpp b/libraries/AP_AHRS/AP_AHRS.cpp index 889272b2d4..9f41559e1a 100644 --- a/libraries/AP_AHRS/AP_AHRS.cpp +++ b/libraries/AP_AHRS/AP_AHRS.cpp @@ -256,7 +256,7 @@ void AP_AHRS::init() external.init(); #endif -#if !APM_BUILD_TYPE(APM_BUILD_AP_Periph) +#if AP_CUSTOMROTATIONS_ENABLED // convert to new custom rotation // PARAMETER_CONVERSION - Added: Nov-2021 if (_board_orientation == ROTATION_CUSTOM_OLD) { @@ -274,7 +274,7 @@ void AP_AHRS::init() AP::custom_rotations().convert(ROTATION_CUSTOM_1, rpy[0], rpy[1], rpy[2]); } } -#endif // !APM_BUILD_TYPE(APM_BUILD_AP_Periph) +#endif // AP_CUSTOMROTATIONS_ENABLED } // updates matrices responsible for rotating vectors from vehicle body