删除了例子,开始正式设计
重新设计的编译流程
This commit is contained in:
22
include/bus.h
Normal file
22
include/bus.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef AUTO_PILOT_BUS_BUS_H
|
||||
#define AUTO_PILOT_BUS_BUS_H
|
||||
|
||||
#include "rail.h"
|
||||
|
||||
struct {
|
||||
/**
|
||||
* 指向站点的指针
|
||||
*/
|
||||
rail_node_t* rail_node_pos;
|
||||
/**
|
||||
* 当前行进的距离
|
||||
*/
|
||||
int distance;
|
||||
} bus;
|
||||
|
||||
/**
|
||||
* 表示公交车的结构体
|
||||
*/
|
||||
typedef struct bus bus_t;
|
||||
|
||||
#endif //AUTO_PILOT_BUS_BUS_H
|
@@ -1,11 +0,0 @@
|
||||
//
|
||||
// Created by ricardo on 2022/4/29.
|
||||
//
|
||||
|
||||
#ifndef AUTO_PILOT_BUS_EXAMPLE_H
|
||||
#define AUTO_PILOT_BUS_EXAMPLE_H
|
||||
|
||||
#include "stdio.h"
|
||||
|
||||
void print(char* str);
|
||||
#endif //AUTO_PILOT_BUS_EXAMPLE_H
|
32
include/rail.h
Normal file
32
include/rail.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef AUTO_PILOT_BUS_RAIL_H
|
||||
#define AUTO_PILOT_BUS_RAIL_H
|
||||
|
||||
struct {
|
||||
/**
|
||||
* 站点的编号
|
||||
*/
|
||||
int id;
|
||||
/**
|
||||
* 距离上一个站点的距离
|
||||
*/
|
||||
int last_node_distance;
|
||||
/**
|
||||
* 距离下一个站点的距离
|
||||
*/
|
||||
int next_node_distance;
|
||||
/**
|
||||
* 指向上一个站点的指针
|
||||
*/
|
||||
struct rail_node* last_node;
|
||||
/**
|
||||
* 指向下一个站点的指针
|
||||
*/
|
||||
struct rail_node* next_node;
|
||||
} rail_node;
|
||||
|
||||
/**
|
||||
* 表示轨道上的一个站点的结构体
|
||||
*/
|
||||
typedef struct rail_node rail_node_t;
|
||||
|
||||
#endif //AUTO_PILOT_BUS_RAIL_H
|
Reference in New Issue
Block a user