From 2ea9a1440259ef77e5af3776c022b4473ac34e09 Mon Sep 17 00:00:00 2001 From: fctom1215 <fctom1215@outlook.com> Date: 星期三, 05 二月 2020 22:28:34 +0800 Subject: [PATCH] 修改了侧方位停车。 --- lib/src/main/cpp/driver_test.cpp | 33 +++++++++++++++++++++------------ 1 files changed, 21 insertions(+), 12 deletions(-) diff --git a/lib/src/main/cpp/driver_test.cpp b/lib/src/main/cpp/driver_test.cpp index e109bb3..3608fbf 100644 --- a/lib/src/main/cpp/driver_test.cpp +++ b/lib/src/main/cpp/driver_test.cpp @@ -147,6 +147,9 @@ return; MapList[MapNum].id = id; + + if (type == 1) type = 3; ////////////////////////////////////// + MapList[MapNum].type = type; MapList[MapNum].map.num = pointNum; @@ -380,6 +383,16 @@ free(brief.body); free(brief.point); + struct RtkTime rtkTime; + + rtkTime.YY = RtkBuffer[index].YY; + rtkTime.MM = RtkBuffer[index].MM; + rtkTime.DD = RtkBuffer[index].DD; + rtkTime.hh = RtkBuffer[index].hh; + rtkTime.mm = RtkBuffer[index].mm; + rtkTime.ss = RtkBuffer[index].ss; + rtkTime.mss = RtkBuffer[index].dss; + if (TestStart) { if (CurrExamMapIndex < 0) { CurrExamMapIndex = EnterMap(CarModel, MapList, MapNum); @@ -398,6 +411,11 @@ case MAP_TYPE_STOP_START: break; case MAP_TYPE_PART_EDGE: + DEBUG("杩涘叆渚ф柟浣嶅仠杞﹀満鍦�"); + MA_SendDebugInfo("杩涘叆渚ф柟浣嶅仠杞﹀満鍦� %d", GetMapId(CurrExamMapIndex, MapList, MapNum)); + StartParkEdge(move, &rtkTime); + + CurrExamStatus = 0; break; case MAP_TYPE_CURVE: break; @@ -407,16 +425,6 @@ } } } - - struct RtkTime rtkTime; - - rtkTime.YY = RtkBuffer[index].YY; - rtkTime.MM = RtkBuffer[index].MM; - rtkTime.DD = RtkBuffer[index].DD; - rtkTime.hh = RtkBuffer[index].hh; - rtkTime.mm = RtkBuffer[index].mm; - rtkTime.ss = RtkBuffer[index].ss; - rtkTime.mss = RtkBuffer[index].dss; if (CurrExamMapIndex >= 0) { if (CurrExamStatus == 0) { @@ -429,6 +437,7 @@ case MAP_TYPE_STOP_START: break; case MAP_TYPE_PART_EDGE: + CurrExamStatus = TestParkEdge(&MapList[CurrExamMapIndex].map, CarModel, CarModelPrev, speed, move, &rtkTime); break; case MAP_TYPE_CURVE: break; @@ -672,7 +681,7 @@ } else if (mapList[i].type == MAP_TYPE_CURVE) { - } else if (mapList[i].type == MAP_TYPE_PARK_BUTTOM) { + } else if (mapList[i].type == MAP_TYPE_PARK_BUTTOM || mapList[i].type == MAP_TYPE_PART_EDGE) { if (IntersectionOf(car->carXY[ car->axial[AXIAL_FRONT] ], &mapList[i].map) == GM_Containment) { Line enterLine1, enterLine2; @@ -693,7 +702,7 @@ bool ret = false; if (index < 0 || mapList == NULL || mapNum == 0) return true; - if (mapList[index].type == MAP_TYPE_PARK_BUTTOM) { + if (mapList[index].type == MAP_TYPE_PARK_BUTTOM || mapList[index].type == MAP_TYPE_PART_EDGE) { // 鍏ㄨ溅閮介渶涓嶅湪鍦板浘涓� Polygon carBody; -- Gitblit v1.8.0