Merge branch 'master' of http://10.3.255.244:8801/class_huanghai/group37/2021211180
This commit is contained in:
commit
0f4d0c511c
10
src/bus_io.c
10
src/bus_io.c
|
@ -151,16 +151,20 @@ void PrintState(char *str)
|
|||
{
|
||||
memset(str, 0, 150);
|
||||
|
||||
int count;
|
||||
int count, flag = 1; //flag用于标记,为使下面第一个循环能够进入
|
||||
rail_node_t *p = NULL;
|
||||
char target[20], clockwise[20], counterclockwise[20];
|
||||
char target[25], clockwise[25], counterclockwise[25];
|
||||
|
||||
for (count = 0, p = rails; p != NULL; p = p->next_node, count++)
|
||||
for (count = 0, p = rails; flag == 1 || p != rails; p = p->next_node, count++)
|
||||
{
|
||||
flag=0;
|
||||
target[count] = '0';
|
||||
clockwise[count] = '0';
|
||||
counterclockwise[count] = '0';
|
||||
} //遍历轨道链表,将所有站点初始化为0,即:无任何请求;
|
||||
target[count] = '\0';
|
||||
clockwise[count] = '\0';
|
||||
counterclockwise[count] = '\0';
|
||||
|
||||
bus_query_t *t = NULL;
|
||||
int i;
|
||||
|
|
Loading…
Reference in New Issue
Block a user