AP_Math: add and use AP_CUSTOMROTATIONS_ENABLED

also add to build_options.py
This commit is contained in:
Peter Barker 2024-02-29 15:39:18 +11:00 committed by Peter Barker
parent 077dd82bdc
commit cf9c85d295
2 changed files with 4 additions and 4 deletions

View File

@ -381,8 +381,8 @@ void QuaternionT<T>::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

View File

@ -259,8 +259,8 @@ void Vector3<T>::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