Car/Peripheral/Inc/path_plan.h

30 lines
454 B
C
Raw Normal View History

2024-07-17 21:19:00 +08:00
#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