From d693b09851a076fa749462e7b1bab97ea543a086 Mon Sep 17 00:00:00 2001 From: nvhaizi1 Date: Tue, 24 May 2022 22:55:40 +0800 Subject: [PATCH] =?UTF-8?q?JudgeOnStation=E4=BB=A3=E7=A0=81=E9=A3=8E?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bus.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bus.c b/src/bus.c index 924d9ba..c45b5b9 100644 --- a/src/bus.c +++ b/src/bus.c @@ -28,16 +28,16 @@ int GetBusPosition() } int JudgeOnStation() { - if(abs(the_bus->distance) == rails->last_node_distance)//表示逆时针 + if (abs(the_bus->distance) == rails->last_node_distance)//表示逆时针 { - the_bus->distance=0; - the_bus->rail_node_pos=rails->last_node;//逆时针往上一个 + the_bus->distance = 0; + the_bus->rail_node_pos = rails->last_node;//逆时针往上一个 return BUS_TRUE; } - else if(abs(the_bus->distance) == rails->next_node_distance)//表示顺时针 + else if (abs(the_bus->distance) == rails->next_node_distance)//表示顺时针 { - the_bus->distance=0; - the_bus->rail_node_pos=rails->next_node;//顺时针往下一个 + the_bus->distance = 0; + the_bus->rail_node_pos = rails->next_node;//顺时针往下一个 return BUS_TRUE; } else