diff --git a/src/include/arm_action_define.h b/src/include/arm_action_define.h index 92f5e1d..d9e6269 100644 --- a/src/include/arm_action_define.h +++ b/src/include/arm_action_define.h @@ -1,6 +1,8 @@ #ifndef ARM_ACTION_DEFINE_H #define ARM_ACTION_DEFINE_H +#include "err_code.h" + #define USED_ARM_DOF (6) #define GOAL_DATA_LENGTH (7) #define USED_OTHER_DOF (17) @@ -29,16 +31,5 @@ typedef enum { RIGHT_ARM, ARM_ID_ERR } ArmIdE; - - -typedef enum { - OK = 0, - UNKNOWN_ERR = -1, - ARM_NOW_FORCE_MOVING = -2, - ARM_COLLISION = -3, - ARM_AIM_CANNOT_REACH = -4, - ARM_NOW_NO_GOAL = -5, - ARM_GOAL_CANCELLED = -6, -} ErrCodeE; #endif // ARM_ACTION_DEFINE_H \ No newline at end of file diff --git a/src/include/err_code.h b/src/include/err_code.h new file mode 100644 index 0000000..73befa6 --- /dev/null +++ b/src/include/err_code.h @@ -0,0 +1,14 @@ +#ifndef ERR_CODE_H +#define ERR_CODE_H + +typedef enum { + OK = 0, + UNKNOWN_ERR = -1, + ARM_NOW_FORCE_MOVING = -2, + ARM_COLLISION = -3, + ARM_AIM_CANNOT_REACH = -4, + ARM_NOW_NO_GOAL = -5, + ARM_GOAL_CANCELLED = -6, +} ErrCodeE; + +#endif // ERR_CODE_H \ No newline at end of file