Browse Source

change driver/driver_map_xodrload for add 600 endpoint.

yuchuli 3 years ago
parent
commit
5670043407
3 changed files with 22 additions and 2 deletions
  1. 1 1
      include/ivversion.h
  2. 1 1
      include/ivversion.sh
  3. 20 0
      src/driver/driver_map_xodrload/main.cpp

+ 1 - 1
include/ivversion.h

@@ -1,7 +1,7 @@
 #ifndef IVVERSION_H
 #ifndef IVVERSION_H
 #define IVVERSION_H
 #define IVVERSION_H
 
 
-#include "ivversion_def.h"
+#include "ivversion_def.h"   //Please use common.pri, If you don't want use ivversion_def.h can comment this line.
 
 
 #ifndef IVVERSION
 #ifndef IVVERSION
 #define IVVERSION "1.1.0-develop"
 #define IVVERSION "1.1.0-develop"

+ 1 - 1
include/ivversion.sh

@@ -23,7 +23,7 @@ if [ ! -f "ivversion_def.h" ]; then
   echo $VERSIONINFO >> ivversion_def.h
   echo $VERSIONINFO >> ivversion_def.h
   echo "#endif" >> ivversion_def.h
   echo "#endif" >> ivversion_def.h
 else
 else
-  echo "file exit."
+  echo "file exist."
   OLDVERSIONINFO=$(sed -n "3p" ivversion_def.h)
   OLDVERSIONINFO=$(sed -n "3p" ivversion_def.h)
   echo "old:"$OLDVERSIONINFO
   echo "old:"$OLDVERSIONINFO
   if [ ! "$OLDVERSIONINFO"x = "$VERSIONINFO"x ]; then
   if [ ! "$OLDVERSIONINFO"x = "$VERSIONINFO"x ]; then

+ 20 - 0
src/driver/driver_map_xodrload/main.cpp

@@ -479,6 +479,26 @@ void SetPlan(xodrobj xo)
     int i;
     int i;
     int nSize = xPlan.size();
     int nSize = xPlan.size();
 
 
+    if(nSize<1)
+    {
+        qDebug("plan fail.");
+        return;
+    }
+    PlanPoint xLastPoint = xPlan[nSize -1];
+    for(i=0;i<600;i++)
+    {
+        PlanPoint pp = xLastPoint;
+        double fdis = 0.1*(i+1);
+        pp.mS = pp.mS + i*0.1;
+        pp.x = pp.x + fdis * cos(pp.hdg);
+        pp.y = pp.y + fdis * sin(pp.hdg);
+        pp.nSignal = 23;
+        xPlan.push_back(pp);
+
+    }
+
+    nSize = xPlan.size();
+
     std::vector<iv::GPSData> mapdata;
     std::vector<iv::GPSData> mapdata;
 
 
     QFile xfile;
     QFile xfile;