diff --git a/src/BusStrategyBase.cpp b/src/BusStrategyBase.cpp index e6c4241..dd9d9ef 100644 --- a/src/BusStrategyBase.cpp +++ b/src/BusStrategyBase.cpp @@ -193,11 +193,11 @@ QString BusStrategyBase::PrintState(int remaining_time) const QString str = QString::asprintf("Time:%d\n", bus_tick); str += "BUS:\n"; - str += QString::asprintf("position:%lf\n", bus_model->GetBusPosition(remaining_time)); + str += QString::asprintf("position:%.3lf\n", bus_model->GetBusPosition(remaining_time)); str = str + "target:" + target + "\n"; str += "STATION:\n"; - str = str + "clockwise" + clockwise + "\n"; - str = str + "counterclockwise" + counterclockwise + "\n"; + str = str + "clockwise:" + clockwise + "\n"; + str = str + "counterclockwise:" + counterclockwise + "\n"; return str; } \ No newline at end of file diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 91dc6fa..708e2fe 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -162,5 +162,7 @@ void MainWindow::EndTickTimerSlot() void MainWindow::BeginBusTimerSlot(int direction, int duration) { - bus_timer->start(duration); + // 这里得多计上一段时间 + // 执行动画需要消耗时间 + bus_timer->start(duration + 20); } \ No newline at end of file