From 24428a1b69afcf113883e9cede1159443201a1b8 Mon Sep 17 00:00:00 2001
From: yy1717 <fctom1215@outlook.com>
Date: 星期四, 02 四月 2020 18:57:07 +0800
Subject: [PATCH] 进出科目二区域调整
---
lib/src/main/cpp/test_items/turn_a90.cpp | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/lib/src/main/cpp/test_items/turn_a90.cpp b/lib/src/main/cpp/test_items/turn_a90.cpp
index 6ee18df..4b3ba68 100644
--- a/lib/src/main/cpp/test_items/turn_a90.cpp
+++ b/lib/src/main/cpp/test_items/turn_a90.cpp
@@ -10,6 +10,7 @@
#include "../utils/xconvert.h"
#include "../defs.h"
#include "../test_common/car_sensor.h"
+#include "../master/comm_if.h"
#include <vector>
#include <cstdlib>
@@ -21,6 +22,7 @@
const uint32_t STOP_CAR_TIME = D_SEC(2);
static bool testing;
+static int mapIndex;
static int enterAreaHeading;
static bool turnLeftFinished;
@@ -33,7 +35,7 @@
static bool CrashRedLine(const Polygon *map, const car_model *car);
static bool ExitTestArea(const Polygon *map, const car_model *car);
-void StartTurnA90(int moveDirect, double heading, const struct RtkTime *rtkTime)
+void StartTurnA90(int index, int moveDirect, double heading, const struct RtkTime *rtkTime)
{
DEBUG("杩涘叆鐩磋杞集鍦哄湴");
testing = true;
@@ -45,6 +47,9 @@
reportStopCarTimeout = false;
crashRedLine = false;
turnLeftFinished = false;
+ mapIndex = index;
+
+ MA_EnterMap(mapIndex, MAP_TYPE_TURN_90, 1);
}
int TestTurnA90(const Polygon *map, const car_model *car, const car_model *carPrev, double heading, double speed, int moveDirect, const struct RtkTime *rtkTime)
@@ -118,6 +123,11 @@
if (turnLeftFinished) {
}
+
+ if (!testing) {
+ MA_EnterMap(mapIndex, MAP_TYPE_TURN_90, 0);
+ }
+
TEST_END:
return testing? 1:0;
}
--
Gitblit v1.8.0