From f5c123f6e78b25fb325c391a3c2ffeccf930f316 Mon Sep 17 00:00:00 2001 From: endian11 <Dana_Lee1016@126.com> Date: 星期二, 29 九月 2020 15:55:10 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/endian11/DriveJudge into lowprecision --- lib/src/main/cpp/test_items/park_bottom.cpp | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/src/main/cpp/test_items/park_bottom.cpp b/lib/src/main/cpp/test_items/park_bottom.cpp index 7872b06..5854125 100644 --- a/lib/src/main/cpp/test_items/park_bottom.cpp +++ b/lib/src/main/cpp/test_items/park_bottom.cpp @@ -33,6 +33,8 @@ static int mapIndex = 0; const uint32_t STOP_CAR_TIME = D_SEC(2); +const uint32_t CHECK_PARK_DELAY = 400; + static uint32_t stopTimepoint; static int prevMoveDirect, storeMoveDirectBeforeStop; static bool occurCrashRedLine; @@ -165,7 +167,7 @@ stopTimepoint = tp; storeMoveDirectBeforeStop = prevMoveDirect; if (prevMoveDirect == -1) { - checkPartStatus = true; + checkPartStatus = true; // 姣忔鍊掕溅鍋滄锛岃Е鍙戝叆搴撴鏌� } DEBUG("鍋滆溅浜� %d %d %d %d %d %d %d", rtkTime->YY, rtkTime->MM, rtkTime->DD, rtkTime->hh, rtkTime->mm, rtkTime->ss, rtkTime->mss); @@ -198,14 +200,10 @@ } } else { // 鍒囨崲涓哄墠杩� - if (tp - stopTimepoint >= STOP_CAR_TIME) { + DEBUG("鍒囨崲涓哄墠杩�"); + + if (tp - stopTimepoint >= CHECK_PARK_DELAY) { if (crossCtrlLineSw) { - if (checkPartStatus) { - if (EnterParking(map, car)) { - parkStatus[parkCount] = 1; - } - checkPartStatus = false; - } if (parkStatus[parkCount] != 1) { // 鍊掑簱涓嶅叆锛屼笉鍚堟牸 reportParkFail = true; @@ -234,7 +232,7 @@ firstReverseTimepoint = tp; } } else if (moveDirect == 0 && crossCtrlLineSw) { - if (tp - stopTimepoint >= STOP_CAR_TIME && checkPartStatus) { + if (tp - stopTimepoint >= CHECK_PARK_DELAY && checkPartStatus) { if (EnterParking(map, car)) { parkStatus[parkCount] = 1; } -- Gitblit v1.8.0