From ed39bd95830f4d00b634b18c9a7598eb2f7bed76 Mon Sep 17 00:00:00 2001 From: zj Date: Mon, 27 Oct 2025 14:03:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=94=99=E8=AF=AF=E7=A0=81?= =?UTF-8?q?=E5=A4=B4=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/include/arm_action_define.h | 13 ++----------- src/include/err_code.h | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 src/include/err_code.h 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