From 1101dc614acb3cd794c13cd68c9a24d7c353cb28 Mon Sep 17 00:00:00 2001
From: yy1717 <fctom1215@outlook.com>
Date: 星期六, 21 三月 2020 15:56:03 +0800
Subject: [PATCH] 坐标
---
lib/src/main/cpp/test_items2/through_something.cpp | 24 +++++++++++++++++++++---
1 files changed, 21 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 33fe453..f0fa865 100644
--- a/lib/src/main/cpp/test_items2/through_something.cpp
+++ b/lib/src/main/cpp/test_items2/through_something.cpp
@@ -17,17 +17,22 @@
static int breakActive;
static int stopActive;
+static bool crashRedLine;
void StartThroughExam(int index, LIST_ROAD_MAP &RoadMapList)
{
if (index == -1)
return;
- DEBUG("杩涘叆璺�冨瓙鍦板浘 index = %d id = %d item = %d", index, RoadMapList[index].id, RoadMapList[index].type);
+ DEBUG("杩涘叆璺�冮�氳繃something鍦板浘 index = %d id = %d item = %d", index, RoadMapList[index].id, RoadMapList[index].type);
if (!RoadMapList[index].tts.empty()) {
+ DEBUG("鎾斁TTS");
PlayTTS(RoadMapList[index].tts.c_str(), 0);
+ } else {
+ DEBUG("娌℃湁TTS");
}
breakActive = 0;
stopActive = 0;
+ crashRedLine = false;
}
int ExecuteThroughExam(int index, LIST_ROAD_MAP &RoadMapList, const car_model *car,
@@ -99,6 +104,7 @@
default:
break;
}
+ stopActive = -1;
} else if (distance2StopLine < DISTANCE_STOP_CAR_TO_STOP_LINE) {
if (moveDirect == 0) {
stopActive = 1;
@@ -106,9 +112,21 @@
}
}
- if (ExitSonArea(index, RoadMapList, car))
+ if (CrashSonRedLine(index, RoadMapList, car, CarModelList)) {
+ if (!crashRedLine) {
+ DEBUG("涓嶆寜鑰冭瘯鍛樻寚浠よ椹�");
+ crashRedLine = true;
+ // 涓嶆寜鑰冭瘯鍛樻寚浠よ椹�
+ AddExamFault(3, rtkTime);
+ }
+ } else {
+ crashRedLine = false;
+ }
+
+ if (ExitSonArea(index, RoadMapList, car)) {
+ DEBUG("绂诲紑閫氳繃something鍖哄煙");
return -1;
+ }
return index;
}
-
--
Gitblit v1.8.0