diff --git a/libraries/AP_Common/AP_Param.cpp b/libraries/AP_Common/AP_Param.cpp index e3d73c3059..17c2c28ada 100644 --- a/libraries/AP_Common/AP_Param.cpp +++ b/libraries/AP_Common/AP_Param.cpp @@ -15,6 +15,7 @@ #include #include +#include #include #include diff --git a/libraries/AP_Common/AP_Param.h b/libraries/AP_Common/AP_Param.h index 3207911356..b898a8a297 100644 --- a/libraries/AP_Common/AP_Param.h +++ b/libraries/AP_Common/AP_Param.h @@ -18,7 +18,6 @@ #include #include -#include #define AP_MAX_NAME_SIZE 15 @@ -431,13 +430,12 @@ AP_PARAMDEF(int8_t, Int8, AP_PARAM_INT8); // defines AP_Int8 AP_PARAMDEF(int16_t, Int16, AP_PARAM_INT16); // defines AP_Int16 AP_PARAMDEF(int32_t, Int32, AP_PARAM_INT32); // defines AP_Int32 -#define AP_PARAMDEFV(_t, _n, _pt) typedef AP_ParamV<_t, _pt> AP_##_n; -AP_PARAMDEFV(Matrix3f, Matrix3f, AP_PARAM_MATRIX3F); -AP_PARAMDEFV(Vector3f, Vector3f, AP_PARAM_VECTOR3F); - #define AP_PARAMDEFA(_t, _n, _size, _pt) typedef AP_ParamA<_t, _size, _pt> AP_##_n; AP_PARAMDEFA(float, Vector6f, 6, AP_PARAM_VECTOR6F); +// this is used in AP_Math.h +#define AP_PARAMDEFV(_t, _n, _pt) typedef AP_ParamV<_t, _pt> AP_##_n; + /// Rely on built in casting for other variable types /// to minimize template creation and save memory #define AP_Uint8 AP_Int8 diff --git a/libraries/AP_Math/AP_Math.h b/libraries/AP_Math/AP_Math.h index 7fd090b9f3..fbff53cb3d 100644 --- a/libraries/AP_Math/AP_Math.h +++ b/libraries/AP_Math/AP_Math.h @@ -2,8 +2,13 @@ // Assorted useful math operations for ArduPilot(Mega) +#include #include #include "vector2.h" #include "vector3.h" #include "matrix3.h" #include "polygon.h" + +// define AP_Param types AP_Vector3f and Ap_Matrix3f +AP_PARAMDEFV(Matrix3f, Matrix3f, AP_PARAM_MATRIX3F); +AP_PARAMDEFV(Vector3f, Vector3f, AP_PARAM_VECTOR3F);