yy1717
2020-08-24 fb7b0660a319a9c54ff35c3944548348fae11b60
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("地图解析完毕");
                CleanRoadMap();