Ver código fonte

modify final brake pro

zhangjia 3 anos atrás
pai
commit
d68531525c

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

@@ -955,13 +955,20 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
             std::cout<<"map finish brake"<<std::endl;
             std::cout<<"map finish brake"<<std::endl;
     }
     }
 
 
-    if(!circleMode && PathPoint+500<gpsMapLine.size()){
-            if(gpsMapLine[PathPoint+500]->mode2==23 && realspeed>20)
+    if(!circleMode){
+            if(PathPoint+500<gpsMapLine.size())
+            {
+                if(gpsMapLine[PathPoint+500]->mode2==23 && realspeed>20)
                                         minDecelerate=-0.5;
                                         minDecelerate=-0.5;
-            else if(gpsMapLine[PathPoint+300]->mode2==23 && realspeed>15)
+            }
+            else if(PathPoint+300<gpsMapLine.size()){
+                if(gpsMapLine[PathPoint+300]->mode2==23 && realspeed>15)
                                         minDecelerate=-0.5;
                                         minDecelerate=-0.5;
-            else if(gpsMapLine[PathPoint+100]->mode2==23)
+            }
+            else if(PathPoint+100<gpsMapLine.size()){
+                    if(gpsMapLine[PathPoint+100]->mode2==23)
                                         minDecelerate=-0.5;
                                         minDecelerate=-0.5;
+            }
     }
     }
 
 
     if(!ServiceCarStatus.inRoadAvoid){
     if(!ServiceCarStatus.inRoadAvoid){