feat: 小车巡线
This commit is contained in:
parent
7ae55eee36
commit
2efc1e8375
29
User/Inc/path_plan.h
Normal file
29
User/Inc/path_plan.h
Normal 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
|
Loading…
Reference in New Issue
Block a user