Browse Source

modify avoid pro

zhangjia 3 years ago
parent
commit
7d9bf29f6c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/decition/decition_brain_sf/decition/decide_gps_00.cpp

+ 4 - 1
src/decition/decition_brain_sf/decition/decide_gps_00.cpp

@@ -1783,10 +1783,13 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
 
 
     road_permit_avoid=false;
     road_permit_avoid=false;
     if(PathPoint+600<gpsMapLine.size()){
     if(PathPoint+600<gpsMapLine.size()){
+        int road_permit_sum=0;
         for(int k=PathPoint;k<PathPoint+600;k++){
         for(int k=PathPoint;k<PathPoint+600;k++){
                 if((gpsMapLine[k]->mbnoavoid==false)&&(gpsMapLine[k]->roadSum>1))
                 if((gpsMapLine[k]->mbnoavoid==false)&&(gpsMapLine[k]->roadSum>1))
-                                 road_permit_avoid=true;
+                                 road_permit_sum++;
         }
         }
+        if(road_permit_sum>=600)
+            road_permit_avoid=true;
     }
     }
 
 
     //shiyanbizhang 0929
     //shiyanbizhang 0929