feat: 小车巡线

This commit is contained in:
JasonChen 2024-07-17 21:30:41 +08:00
parent 7ae55eee36
commit 2efc1e8375

29
User/Inc/path_plan.h Normal file
View File

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