修复了结构体定义错误
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#include "rail.h"
|
||||
#include "query.h"
|
||||
|
||||
struct {
|
||||
struct bus {
|
||||
/**
|
||||
* 指向站点的指针
|
||||
*/
|
||||
@@ -14,7 +14,7 @@ struct {
|
||||
* 当前行进的距离
|
||||
*/
|
||||
int distance;
|
||||
} bus;
|
||||
};
|
||||
|
||||
/**
|
||||
* 表示公交车的结构体
|
||||
|
@@ -11,11 +11,11 @@ enum read_state{
|
||||
/**
|
||||
* 时钟
|
||||
*/
|
||||
clock = 0,
|
||||
io_clock = 0,
|
||||
/**
|
||||
* 读取中
|
||||
*/
|
||||
reading,
|
||||
io_reading,
|
||||
/**
|
||||
* 结束
|
||||
*/
|
||||
|
@@ -4,9 +4,10 @@
|
||||
|
||||
#ifndef AUTO_PILOT_BUS_QUERY_H
|
||||
#define AUTO_PILOT_BUS_QUERY_H
|
||||
#include "stdlib.h"
|
||||
#include "rail.h"
|
||||
|
||||
struct {
|
||||
struct up_bus {
|
||||
/**
|
||||
* 请求的序号
|
||||
*/
|
||||
@@ -20,9 +21,9 @@ struct {
|
||||
*/
|
||||
rail_node_t* target;
|
||||
struct up_bus* next;
|
||||
} up_bus;
|
||||
};
|
||||
|
||||
struct {
|
||||
struct down_bus {
|
||||
/**
|
||||
* 请求的序号
|
||||
*/
|
||||
@@ -32,7 +33,7 @@ struct {
|
||||
*/
|
||||
rail_node_t* target;
|
||||
struct down_bus* next;
|
||||
} down_bus;
|
||||
};
|
||||
|
||||
/**
|
||||
* 表示上车请求的结构体
|
||||
|
@@ -1,7 +1,8 @@
|
||||
#ifndef AUTO_PILOT_BUS_RAIL_H
|
||||
#define AUTO_PILOT_BUS_RAIL_H
|
||||
#include "stdlib.h"
|
||||
|
||||
struct {
|
||||
struct rail_node {
|
||||
/**
|
||||
* 站点的编号
|
||||
*/
|
||||
@@ -22,7 +23,7 @@ struct {
|
||||
* 指向下一个站点的指针
|
||||
*/
|
||||
struct rail_node* next_node;
|
||||
} rail_node;
|
||||
};
|
||||
|
||||
/**
|
||||
* 表示轨道上的一个站点的结构体
|
||||
|
Reference in New Issue
Block a user