From fb7b0660a319a9c54ff35c3944548348fae11b60 Mon Sep 17 00:00:00 2001
From: yy1717 <fctom1215@outlook.com>
Date: 星期一, 24 八月 2020 18:53:23 +0800
Subject: [PATCH] 坐标
---
lib/src/main/cpp/master/comm_if.cpp | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/lib/src/main/cpp/master/comm_if.cpp b/lib/src/main/cpp/master/comm_if.cpp
index e6c8db2..cb82dff 100644
--- a/lib/src/main/cpp/master/comm_if.cpp
+++ b/lib/src/main/cpp/master/comm_if.cpp
@@ -918,7 +918,11 @@
MakeLine(&temp.line, &p1, &p2);
}
}
+ if (itr2->HasMember("center_point")) {
+ const Value &s = (*itr2)["center_point"];
+ temp.centrePoint = mapPoints[s.GetInt()];
+ }
crossing.push_back(temp);
}
@@ -1136,6 +1140,33 @@
map.triggerLines.push_back(trigger);
}
}
+ if (doc.HasMember("red_line")) {
+ const Value &a = doc["red_line"];
+
+ for (Value::ConstValueIterator itr = a.Begin();
+ itr != a.End(); ++itr) {
+ forbid_line_t forbid;
+
+ if (itr->HasMember("type")) {
+ const Value &s = (*itr)["type"];
+ forbid.type = s.GetInt();
+ }
+ if (itr->HasMember("id")) {
+ const Value &s = (*itr)["id"];
+ forbid.id = s.GetInt();
+ }
+ if (itr->HasMember("points")) {
+ const Value &a2 = (*itr)["points"];
+
+ for (Value::ConstValueIterator itr2 = a2.Begin();
+ itr2 != a2.End(); ++itr2) {
+ forbid.points.push_back(mapPoints[(*itr2).GetInt()]);
+ }
+ }
+ map.forbidLines.push_back(forbid);
+ }
+ }
+
DEBUG("鍦板浘瑙f瀽瀹屾瘯");
CleanRoadMap();
--
Gitblit v1.8.0