/* * StateManager.h * * Created on: Mar 24, 2025 * Author: bihon */ #ifndef INC_STATEMANAGER_H_ #define INC_STATEMANAGER_H_ // 定义状态枚举 typedef enum { STATE_MANUAL_CONTROL, //手动模式 STATE_PAINTING, //作业模式 STATE_STANDBY, //待机模式 STATE_ABNORMAL //异常状态 } Paint_Mode; typedef enum { INVALID_CMD, //无效指令 GOTO_STARTPOSITION, //机械臂前往初始位置 TRIAL_POSITION, //试运行 GOTO_DESENDPAINTING_STARTPOSITION, //机械臂前往"下降喷涂"起点 GOTO_ASCENDPAINTING_STARTPOSITION, //机械臂前往"上升喷涂"起点 START_PAINTING, //机械臂开始喷涂 FINISH_PAINTING, //机械臂结束喷涂 GOTO_STOPPOSITION, //机械臂前往停机位置 GOTO_WASH_GUN_POSITION //机械臂前往洗枪位置 }Paint_Control; void stateMachineLoop(); uint8_t InverseStartFlag(); uint8_t StopPainting(); extern Paint_Mode currentModeCMD; extern Paint_Control currentControlCMD; #endif /* INC_STATEMANAGER_H_ */