增加错误码头文件

This commit is contained in:
zj
2025-10-27 14:03:52 +08:00
parent 08a870598f
commit ed39bd9583
2 changed files with 16 additions and 11 deletions

View File

@@ -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

14
src/include/err_code.h Normal file
View File

@@ -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