diff --git a/User/Inc/path_plan.h b/User/Inc/path_plan.h new file mode 100644 index 0000000..3cb03cd --- /dev/null +++ b/User/Inc/path_plan.h @@ -0,0 +1,29 @@ +#ifndef __PATH_PLAN_H +#define __PATH_PLAN_H + +// 定义方向枚举 +typedef enum +{ + STRAIGHT, + LEFT, + RIGHT, + STOP +} Direction; + +// 定义路径规划器结构 +typedef struct +{ + int currentStep; + Direction* path; + int pathLength; +} PathPlanner; + +// 全局路径规划器 +extern PathPlanner pathPlanner; + +void PathPlanner_Init(); +Direction GetCurrentDirection(); +Direction GetNextDirection(); +void AddPathStep(Direction step); + +#endif