From 30a044067743c3d9d919d58456315816b071c412 Mon Sep 17 00:00:00 2001
From: yy1717 <fctom1215@outlook.com>
Date: 星期六, 21 三月 2020 19:00:52 +0800
Subject: [PATCH] 坐标

---
 lib/src/main/cpp/test_items2/through_something.cpp |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/src/main/cpp/test_items2/through_something.cpp b/lib/src/main/cpp/test_items2/through_something.cpp
index f0fa865..af55926 100644
--- a/lib/src/main/cpp/test_items2/through_something.cpp
+++ b/lib/src/main/cpp/test_items2/through_something.cpp
@@ -51,13 +51,15 @@
         distance2StopLine = -distance2StopLine;
     }
 
-    // 璺濈鍋滄绾�30绫冲墠鏄惁鏈夊埞杞﹀姩浣�
+    // 璺濈鍋滄绾�30绫冲唴鏄惁鏈夊埞杞﹀姩浣�
     if (breakActive == 0) {
-        if (distance2StopLine >= LASTEST_BREAK_POINT) {
+        if (distance2StopLine > 0 && distance2StopLine <= LASTEST_BREAK_POINT) {
             if (ReadCarStatus(BREAK) == BREAK_ACTIVE) {
                 breakActive = 1;
             }
-        } else {
+        }
+
+        if (distance2StopLine < 0 && breakActive != 1){
             breakActive = -1;
             // 涓嶆寜瑙勫畾鍑忛�燂紝涓嶅悎鏍�
             DEBUG("涓嶈俯涓嬪埞杞︼紝涓嶅悎鏍�");

--
Gitblit v1.8.0