Quellcode durchsuchen

Add v2v data show

dongjunhong vor 7 Monaten
Ursprung
Commit
511088f1fe
2 geänderte Dateien mit 8 neuen und 7 gelöschten Zeilen
  1. 1 1
      src/v2x/v2xpro/mainwindow.cpp
  2. 7 6
      src/v2x/v2xpro/pc5.cpp

+ 1 - 1
src/v2x/v2xpro/mainwindow.cpp

@@ -1151,7 +1151,7 @@ void MainWindow::outV2VData(QMap<QString, OBUCarFormation> V2VMessage)
                                                " 纬度:" + QString::number(lat,'g',10) +\
                                             " \n\t横向:" + QString::number(car_x)+ "m"+\
                                             " 纵向:" + QString::number(car_y)+ "m"+ \
-                                               " ]\n\t航向: " + QString::number(qRadiansToDegrees(yaw)) + "°" + \
+                                               " ]\n\t航向: " + QString::number(V2Vcar.car_yaw) + "°" + \
                                            "\n\t大小[ 长:" + QString::number(x) + "m"+\
                                            " 宽:" + QString::number(y) + "m"+ \
                                            " 高:" + QString::number(z) + "m"+ \

+ 7 - 6
src/v2x/v2xpro/pc5.cpp

@@ -732,7 +732,7 @@ QByteArray PC5::upV2Vdatashow()
 {
     QByteArray returndata;
     returndata=V2VshowData;
-    V2VshowData.clear();
+//    V2VshowData.clear();
     return returndata;
 }
 
@@ -798,7 +798,7 @@ void PC5::replyMessage()
                         }
                         else
                         {
-                            qDebug()<<0xff;
+                            error_data=error_data+"light1ff--";
                         }
 
                     }
@@ -818,7 +818,7 @@ void PC5::replyMessage()
                         }
                         else
                         {
-                            qDebug()<<0xff;
+                            error_data=error_data+"light2ff--";
                         }
 
                     }
@@ -838,7 +838,7 @@ void PC5::replyMessage()
                         }
                         else
                         {
-                            qDebug()<<0xff;
+                            error_data=error_data+"light3ff--";
                         }
 
                     }
@@ -858,7 +858,7 @@ void PC5::replyMessage()
                         }
                         else
                         {
-                            qDebug()<<0xff;
+                            error_data=error_data+"light4ff--";
                         }
 
                     }
@@ -1028,7 +1028,8 @@ void PC5::replyMessage()
                     recv_other_car.gps_lng=double(((recvBuf[num+1]<<24)&0xFF000000)|((recvBuf[num+2]<<16)&0xFF0000)|((recvBuf[num+3]<<8)&0xFF00)|((recvBuf[num+4])&0xFF))/10000000;
                     recv_other_car.gps_lat=double(((recvBuf[num+5]<<24)&0xFF000000)|((recvBuf[num+6]<<16)&0xFF0000)|((recvBuf[num+7]<<8)&0xFF00)|((recvBuf[num+8])&0xFF))/10000000;
                     recv_other_car.car_speed=recvBuf[num+9];
-                    recv_other_car.car_yaw=double(((recvBuf[num+10]<<24)&0xFF000000)|((recvBuf[num+11]<<16)&0xFF0000)|((recvBuf[num+12]<<8)&0xFF00)|((recvBuf[num+13])&0xFF))/10;
+
+                    recv_other_car.car_yaw=double(((recvBuf[num+10]<<24)&0xFF000000)|((recvBuf[num+11]<<16)&0xFF0000)|((recvBuf[num+12]<<8)&0xFF00)|((recvBuf[num+13])&0xFF))/100;
 
                     recv_other_car.acc_x=recvBuf[num+14];
                     recv_other_car.acc_y=recvBuf[num+15];