From 529ab6f8a6b422b5299fab9c0ce2f30fe99c7be8 Mon Sep 17 00:00:00 2001 From: yy1717 <fctom1215@outlook.com> Date: 星期五, 15 五月 2020 17:49:49 +0800 Subject: [PATCH] 坐标 --- lib/src/main/cpp/native-lib.cpp | 2 +- lib/src/main/cpp/test_items2/road_exam.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletions(-) diff --git a/lib/src/main/cpp/native-lib.cpp b/lib/src/main/cpp/native-lib.cpp index 5912646..206f071 100644 --- a/lib/src/main/cpp/native-lib.cpp +++ b/lib/src/main/cpp/native-lib.cpp @@ -26,7 +26,7 @@ const int RTK_PLATFORM_PORT = 12125; const uint8_t phone[] = {0x20,0x19,0x10,0x15,0x00,0x00,0x00,0x01}; -const char *VIRTUAL_RTK_IP = "192.168.16.101"; +const char *VIRTUAL_RTK_IP = "192.168.16.100"; const int VIRTUAL_RTK_PORT = 9001; static pthread_mutex_t tts_mutex = PTHREAD_MUTEX_INITIALIZER; diff --git a/lib/src/main/cpp/test_items2/road_exam.cpp b/lib/src/main/cpp/test_items2/road_exam.cpp index a682012..a2205f9 100644 --- a/lib/src/main/cpp/test_items2/road_exam.cpp +++ b/lib/src/main/cpp/test_items2/road_exam.cpp @@ -75,6 +75,7 @@ static int startCar; static int currExamMapIndex; +static int nextRoadId; static bool checkDoor = false; static bool handBreakActive = false; @@ -524,6 +525,9 @@ if (IntersectionOf(&carBody, &area) == GM_None) { DEBUG("绂诲紑璺 id = %d", RoadMap.roads[currExamMapIndex].id); + + RoadMap.roads[currExamMapIndex].arrivedTail = false; + currExamMapIndex = FIND_POSITION; } @@ -713,6 +717,13 @@ laneChanging = false; } } + + ArrivedRoadEnd(RoadMap.roads[currExamMapIndex], car, CarModelList); + + if (CrashTheLine(RoadMap.roads[currExamMapIndex].stopLine, car, CarModelList)) { + DEBUG("涓嬩竴涓洰鏍囪矾 id = %d", RoadMap.roads[currExamMapIndex].targetRoad); + nextRoadId = RoadMap.roads[currExamMapIndex].targetRoad; + } } // 鎾炵孩绾� -- Gitblit v1.8.0