From 148254bb1dc170db320bcb208ca79b0e252751d8 Mon Sep 17 00:00:00 2001 From: fctom1215 <fctom1215@outlook.com> Date: 星期三, 28 四月 2021 19:26:00 +0800 Subject: [PATCH] 修改科目三道路识别问题 --- lib/src/main/cpp/test_common/odo_graph.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/main/cpp/test_common/odo_graph.cpp b/lib/src/main/cpp/test_common/odo_graph.cpp index 977fc23..87381a9 100644 --- a/lib/src/main/cpp/test_common/odo_graph.cpp +++ b/lib/src/main/cpp/test_common/odo_graph.cpp @@ -24,13 +24,13 @@ } void UpdataOdo(double speed, int moveDirect, const struct RtkTime *rtkTime) { - // 琛岄┒璺濈锛屼笉鍖呭惈鍊掕溅 - if (odoCnt == 0 && moveDirect == 1) { + // 琛岄┒璺濈锛屽惈鍊掕溅 + if (odoCnt == 0 && moveDirect != 0) { odoPrevSpeed = speed; odoCnt = 1; odoTimer = *rtkTime; } else if (odoCnt == 1) { - if (moveDirect == 1) { + if (moveDirect != 0) { uint32_t tm = TimeGetDiff(rtkTime, &odoTimer); if (tm >= D_SEC(1)) { odoGraph += ((double) tm) * (odoPrevSpeed + speed) / 2.0 / 1000.0; -- Gitblit v1.8.0