diff --git a/libraries/AP_Math/quaternion.cpp b/libraries/AP_Math/quaternion.cpp index a7be6db0e9..552dd96852 100644 --- a/libraries/AP_Math/quaternion.cpp +++ b/libraries/AP_Math/quaternion.cpp @@ -381,8 +381,8 @@ void QuaternionT::from_rotation(enum Rotation rotation) case ROTATION_CUSTOM_1: case ROTATION_CUSTOM_2: -#if !APM_BUILD_TYPE(APM_BUILD_AP_Periph) - // Do not support custom rotations on Periph +#if AP_CUSTOMROTATIONS_ENABLED + // custom rotations not supported on eg. Periph by default AP::custom_rotations().from_rotation(rotation, *this); return; #endif diff --git a/libraries/AP_Math/vector3.cpp b/libraries/AP_Math/vector3.cpp index 9a1ff1a93b..021b737a01 100644 --- a/libraries/AP_Math/vector3.cpp +++ b/libraries/AP_Math/vector3.cpp @@ -259,8 +259,8 @@ void Vector3::rotate(enum Rotation rotation) } case ROTATION_CUSTOM_1: case ROTATION_CUSTOM_2: -#if !APM_BUILD_TYPE(APM_BUILD_AP_Periph) - // Do not support custom rotations on Periph +#if AP_CUSTOMROTATIONS_ENABLED + // custom rotations not supported on eg. Periph by default AP::custom_rotations().rotate(rotation, *this); return; #endif