From 1e1aaeece479e63ab68791e9433d934672796cca Mon Sep 17 00:00:00 2001 From: nvhaizi1 Date: Tue, 24 May 2022 18:13:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9RunBus=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bus.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/bus.c b/src/bus.c index 6b91231..f99e32f 100644 --- a/src/bus.c +++ b/src/bus.c @@ -6,18 +6,10 @@ void RunBus(int direction) if(direction == BUS_CLOCK_WISE)//顺时针 { the_bus->distance++; - if(the_bus->distance == rails->next_node_distance) - { - the_bus->distance=0;//到达一个站点用重新置为0 - } } else if(direction == BUS_COUNTER_CLOCK_WISE) { the_bus->distance--; - if(abs(the_bus->distance) ==rails->last_node_distance) - { - the_bus->distance=0;//到达一个站点又重新置为0 - } } }