From 00c07fb94c6927f3bb8ebfec383a33936f04447b Mon Sep 17 00:00:00 2001
From: yy1717 <fctom1215@outlook.com>
Date: 星期五, 22 五月 2020 19:01:18 +0800
Subject: [PATCH] 坐标
---
lib/src/main/cpp/master/comm_if.cpp | 49 +++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 45 insertions(+), 4 deletions(-)
diff --git a/lib/src/main/cpp/master/comm_if.cpp b/lib/src/main/cpp/master/comm_if.cpp
index c99a0d4..5ff520f 100644
--- a/lib/src/main/cpp/master/comm_if.cpp
+++ b/lib/src/main/cpp/master/comm_if.cpp
@@ -594,7 +594,6 @@
mapPoints.push_back((*itr2).GetDouble());
}
- SetRoadMapPoints(mapPoints);
}
if (doc.HasMember("maps")) {
@@ -737,7 +736,6 @@
tts = s.GetString();
}
- AddRoadMapParent(id, type, tts, stop_flag, redLines, redAreas, greenLines, triggerLines, roadEdgeLines, area, stopLine);
}
}
}
@@ -959,8 +957,6 @@
if (doc.HasMember("special_area")) {
const Value &a = doc["special_area"];
- vector<special_area_t> specialAreas;
-
for (Value::ConstValueIterator itr = a.Begin();
itr != a.End(); ++itr) {
special_area_t specialArea;
@@ -991,7 +987,52 @@
}
}
if (doc.HasMember("trigger_line")) {
+ const Value &a = doc["trigger_line"];
+ for (Value::ConstValueIterator itr = a.Begin();
+ itr != a.End(); ++itr) {
+ trigger_line_t trigger;
+
+ if (itr->HasMember("type")) {
+ const Value &s = (*itr)["type"];
+ trigger.active = s.GetInt();
+ }
+ if (itr->HasMember("id")) {
+ const Value &s = (*itr)["id"];
+ trigger.id = s.GetInt();
+ }
+ if (itr->HasMember("road")) {
+ const Value &s = (*itr)["road"];
+ trigger.road = s.GetInt();
+ }
+ if (itr->HasMember("tts")) {
+ const Value &s = (*itr)["tts"];
+ trigger.tts = s.GetString();
+ }
+ if (itr->HasMember("time")) {
+ const Value &s = (*itr)["time"];
+ trigger.time = s.GetInt();
+ } else {
+ trigger.time = 0;
+ }
+ if (itr->HasMember("distance")) {
+ const Value &s = (*itr)["distance"];
+ trigger.distance = s.GetInt();
+ } else {
+ trigger.distance = 0;
+ }
+
+ if (itr->HasMember("line")) {
+ const Value &a2 = (*itr)["line"];
+
+ for (Value::ConstValueIterator itr2 = a2.Begin();
+ itr2 != a2.End(); ++itr2) {
+ trigger.points.push_back(mapPoints[(*itr2).GetInt()]);
+ }
+ }
+
+ map.triggerLines.push_back(trigger);
+ }
}
DEBUG("鍦板浘瑙f瀽瀹屾瘯");
--
Gitblit v1.8.0