| | |
| | | } |
| | | free(map.triggerLine); |
| | | } |
| | | |
| | | if (map.area.point != NULL) { |
| | | free(map.area.point); |
| | | } |
| | | } |
| | | |
| | | RoadMapList.clear(); |
| | |
| | | } |
| | | } |
| | | |
| | | void AddRoadMapParent(int id, int type, string tts, vector<vector<int>> &redLines, |
| | | vector<vector<int>> &redAreas, vector<vector<int>> &greenLines, vector<vector<int>> &triggerLines) |
| | | void AddRoadMapParent(int id, int type, string tts, |
| | | vector<vector<int>> &redLines, |
| | | vector<vector<int>> &redAreas, |
| | | vector<vector<int>> &greenLines, |
| | | vector<vector<int>> &triggerLines, |
| | | vector<int> area, |
| | | vector<int> stopLine) |
| | | { |
| | | struct road_exam_map newMap; |
| | | |
| | |
| | | } else { |
| | | newMap.triggerLine = NULL; |
| | | }; |
| | | |
| | | if (area.size() > 0) { |
| | | newMap.area.num = area.size(); |
| | | newMap.area.point = (PointF *) malloc(sizeof(PointF) * newMap.area.num); |
| | | |
| | | for (int i = 0; i < newMap.area.num; ++i) { |
| | | newMap.area.point[i] = RoadMapPoints.point[area[i]]; |
| | | } |
| | | } else { |
| | | newMap.area.point = NULL; |
| | | newMap.area.num = 0; |
| | | } |
| | | |
| | | if (stopLine.size() == 4) { |
| | | newMap.stopLine.X1 = stopLine[0]; |
| | | newMap.stopLine.Y1 = stopLine[1]; |
| | | newMap.stopLine.X2 = stopLine[2]; |
| | | newMap.stopLine.Y2 = stopLine[3]; |
| | | } |
| | | |
| | | RoadMapList.push_back(newMap); |
| | | } |
| | |
| | | if (ExamType == TEST_TYPE_AREA) |
| | | AddExamFault(4, rtkTime); |
| | | } |
| | | |
| | | DEBUG("22222222222222222222"); |
| | | if (ExamType == TEST_TYPE_ROAD_DUMMY_LIGHT) { |
| | | if (exam_dummy_light == 0) { |
| | | StartDummyLightExam(DummyLightContent, DummyLightContentSize, rtkTime); |
| | |
| | | CarModelList.push_front(newModel); |
| | | |
| | | while (CarModelList.size() > 100) { |
| | | DEBUG("删除尾结点"); |
| | | car_model *ptr = CarModelList.back(); |
| | | |
| | | if (ptr->body != NULL) |