zhangjia 4 年 前
コミット
bc22a332c9

+ 8 - 0
src/decition/decition_brain/decition/brain.cpp

@@ -1307,18 +1307,24 @@ void iv::decition::BrainDecition::Updatev2x(const char *pdata, const int ndatasi
     if(ServiceCarStatus.stationCmd.has_carMode)
     if(ServiceCarStatus.stationCmd.has_carMode)
     {
     {
             ServiceCarStatus.stationCmd.carMode=v2x_message.carmode();
             ServiceCarStatus.stationCmd.carMode=v2x_message.carmode();
+
+            qDebug("ServiceCarStatus.stationCmd.carMode:",ServiceCarStatus.stationCmd.carMode);
     }
     }
 
 
     ServiceCarStatus.stationCmd.has_emergencyStop=v2x_message.has_emergencystop();
     ServiceCarStatus.stationCmd.has_emergencyStop=v2x_message.has_emergencystop();
     if(ServiceCarStatus.stationCmd.has_emergencyStop)
     if(ServiceCarStatus.stationCmd.has_emergencyStop)
     {
     {
             ServiceCarStatus.stationCmd.emergencyStop=v2x_message.emergencystop();
             ServiceCarStatus.stationCmd.emergencyStop=v2x_message.emergencystop();
+
+            qDebug("ServiceCarStatus.stationCmd.emergencyStop:",ServiceCarStatus.stationCmd.emergencyStop);
     }
     }
 
 
     ServiceCarStatus.stationCmd.has_stationStop=v2x_message.has_stationstop();
     ServiceCarStatus.stationCmd.has_stationStop=v2x_message.has_stationstop();
     if(ServiceCarStatus.stationCmd.has_stationStop)
     if(ServiceCarStatus.stationCmd.has_stationStop)
     {
     {
             ServiceCarStatus.stationCmd.stationStop=v2x_message.stationstop();
             ServiceCarStatus.stationCmd.stationStop=v2x_message.stationstop();
+
+            qDebug("ServiceCarStatus.stationCmd.stationStop:",ServiceCarStatus.stationCmd.stationStop);
     }
     }
 
 
     ServiceCarStatus.stationCmd.stationTotalNum=v2x_message.stationid_size();
     ServiceCarStatus.stationCmd.stationTotalNum=v2x_message.stationid_size();
@@ -1326,6 +1332,8 @@ void iv::decition::BrainDecition::Updatev2x(const char *pdata, const int ndatasi
     {
     {
         ServiceCarStatus.stationCmd.stationGps[i].gps_lat=v2x_message.stgps(v2x_message.stationid(i)).lat();
         ServiceCarStatus.stationCmd.stationGps[i].gps_lat=v2x_message.stgps(v2x_message.stationid(i)).lat();
         ServiceCarStatus.stationCmd.stationGps[i].gps_lng=v2x_message.stgps(v2x_message.stationid(i)).lon();
         ServiceCarStatus.stationCmd.stationGps[i].gps_lng=v2x_message.stgps(v2x_message.stationid(i)).lon();
+
+        qDebug("stationGps: %d, lat: %.7f, lon: %.7f", v2x_message.stationid(i), ServiceCarStatus.stationCmd.stationGps[i].gps_lat, ServiceCarStatus.stationCmd.stationGps[i].gps_lng);
     }
     }
 
 
 }
 }

+ 4 - 0
src/decition/decition_brain/decition/decide_gps_00.cpp

@@ -1755,6 +1755,8 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
             }
             }
             station_nearest=getNearestStation(now_gps_ins,station_received,gpsMapLine);
             station_nearest=getNearestStation(now_gps_ins,station_received,gpsMapLine);
 
 
+            qDebug("station_nearest: %d, lat: %.7f, lon: %.7f", station_nearest.map_index, station_nearest.station_location.gps_lat, ServiceCarStatus.amilng=station_nearest.station_location.gps_lng);
+
             //进入站点模式
             //进入站点模式
             if((ServiceCarStatus.stationCmd.stationStop==0x00))
             if((ServiceCarStatus.stationCmd.stationStop==0x00))
             {
             {
@@ -1969,6 +1971,8 @@ iv::Station iv::decition::DecideGps00::getNearestStation(iv::GPS_INS now_gps_ins
           }
           }
     }
     }
 
 
+    qDebug("station_index:",station_index);
+
     return station_n[station_index];
     return station_n[station_index];
 
 
 }
 }