From 611f51ed073de48e83f46d47c82cd5ebe61258d7 Mon Sep 17 00:00:00 2001
From: yy1717 <fctom1215@outlook.com>
Date: 星期三, 16 九月 2020 18:14:27 +0800
Subject: [PATCH] 加入地图标定模式

---
 lib/src/main/cpp/driver_test.h |   30 +++++++++++++++++++-----------
 1 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/lib/src/main/cpp/driver_test.h b/lib/src/main/cpp/driver_test.h
index 524fccc..d19c35b 100644
--- a/lib/src/main/cpp/driver_test.h
+++ b/lib/src/main/cpp/driver_test.h
@@ -137,16 +137,14 @@
 } separate_t;
 
 typedef struct {
-    int active;
-    string tts;
     bool stopFlag;
     Line line;
+    bool centrePointValid;
     PointF centrePoint;
 } stop_line_t;
 
 typedef struct {
     int id;
-    Line startLine;
 //    Line stopLine;
 //    int active;         // 鍒拌揪璺彛灏鹃儴鐨勮杩涙柟鍚�
     bool activeBreak;   // 璺彛鍒硅溅鍑忛��
@@ -175,15 +173,9 @@
 } special_area_t;
 
 typedef struct {
-    int id;
     int road;
     int active;
-    int time;                   // 椤圭洰鏈�澶у畬鎴愭椂闂�
-    int distance;               // 椤圭洰鏈�澶у畬鎴愯窛绂�
-    string tts;
-    bool cmp;
     std::vector<PointF> points;
-    std::vector<PointF> leftPoints; // 瀵瑰簲鍒伴亾璺乏渚х殑鐐�
 } trigger_line_t;
 
 typedef struct {
@@ -192,11 +184,25 @@
     std::vector<PointF> points;
 } forbid_line_t;
 
+typedef struct {
+    int road_id;
+    int index;
+    int active;
+} crossing_active_t;
+
+typedef struct {
+    std::string name;
+    std::vector<crossing_active_t> crossingActive;
+    std::vector<trigger_line_t> triggerLines;
+} scheme_t;
+
 struct road_exam_map {
+    int calibrate;
     std::vector<road_t> roads;
     std::vector<special_area_t> specialAreas;
-    std::vector<trigger_line_t> triggerLines;
+//    std::vector<trigger_line_t> triggerLines;
     std::vector<forbid_line_t> forbidLines;
+    std::vector<scheme_t> examScheme;
 };
 
 struct area_exam_map {
@@ -218,7 +224,7 @@
 
 
 void CleanRoadMap(void);
-void SetRoadMap(road_exam_map &map);
+void SetRoadMap(road_exam_map &map, vector<scheme_t> &scheme);
 
 void SetCarMeasurePoint(double *basePoint, int *axial, int *left_front_tire,
                         int *right_front_tire, int *left_rear_tire, int *right_rear_tire,
@@ -228,6 +234,8 @@
 
 void UpdateRTKInfo(const rtk_info *s);
 void AddExamFault(int wrong, const struct RtkTime *rtkTime);
+void RoadChange(int road, int status);
+void CrossingChange(int road, int crossing, int status);
 
 void SystemShutdown(int event, int timeout);
 

--
Gitblit v1.8.0