|
@@ -11,6 +11,14 @@ extern std::vector<iv::pos_def> gvectorpos;
|
|
|
ADCIntelligentShow * gAShow;
|
|
|
|
|
|
|
|
|
+#include "grpcclientthread.h"
|
|
|
+
|
|
|
+
|
|
|
+#ifdef Android
|
|
|
+ extern grpcclientthread * ggt;
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
const double PI = 3.1415926535898;
|
|
|
|
|
|
class xodrobj
|
|
@@ -122,6 +130,36 @@ void ListenTraceMap(const char * strdata,const unsigned int nSize,const unsigned
|
|
|
gAShow->UpdateMap(strdata,nSize);
|
|
|
}
|
|
|
|
|
|
+#ifdef Android
|
|
|
+ void ADCIntelligentShow::AndroidSetMsg(const char * msgname , const char *strdata, const unsigned int nDataLen)
|
|
|
+ {
|
|
|
+ if(strncmp(msgname,"hcp2_gpsimu",256) == 0)
|
|
|
+ {
|
|
|
+ Listengpsimu(strdata,nDataLen,0,0,0);
|
|
|
+ }
|
|
|
+ if(strncmp(msgname,"tracemap",256) == 0)
|
|
|
+ {
|
|
|
+ ListenTraceMap(strdata,nDataLen,0,0,0);
|
|
|
+ }
|
|
|
+ if(strncmp(msgname,"lidar_obs",256) == 0)
|
|
|
+ {
|
|
|
+ ListenOBS(strdata,nDataLen,0,0,0);
|
|
|
+ }
|
|
|
+ if(strncmp(msgname,"brainstate",256) == 0)
|
|
|
+ {
|
|
|
+ ListenBrainState(strdata,nDataLen,0,0,0);
|
|
|
+ }
|
|
|
+ if(strncmp(msgname,"deciton",256) == 0)
|
|
|
+ {
|
|
|
+ ListenDection(strdata,nDataLen,0,0,0);
|
|
|
+ }
|
|
|
+ if(strncmp(msgname,"radar",256) == 0)
|
|
|
+ {
|
|
|
+ ListenRadar(strdata,nDataLen,0,0,0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+#endif
|
|
|
+
|
|
|
ADCIntelligentShow::ADCIntelligentShow(QWidget *parent) :
|
|
|
QMainWindow(parent),
|
|
|
ui(new Ui::ADCIntelligentShow)
|
|
@@ -130,6 +168,7 @@ ADCIntelligentShow::ADCIntelligentShow(QWidget *parent) :
|
|
|
ui->setupUi(this);
|
|
|
ui->pushButton->setEnabled(false);
|
|
|
|
|
|
+
|
|
|
//样式 3-26
|
|
|
qApp->setStyleSheet("QPushButton#pushButton_2\n{\nborder-image: url(:/new/pic/restart1.png);\n}"
|
|
|
"QPushButton#pushButton_2:hover\n{border-image: url(:/new/pic/restart4.png);\n}"
|
|
@@ -195,6 +234,7 @@ ADCIntelligentShow::ADCIntelligentShow(QWidget *parent) :
|
|
|
///added by kkcai, 2019-12-02
|
|
|
soundAlarm = new QSound(":/new/pic/alarm.wav");
|
|
|
connect(this, SIGNAL(sigAlarm()), this, SLOT(slotAlarm()));
|
|
|
+#ifndef Android
|
|
|
|
|
|
void * pa;
|
|
|
pa = iv::modulecomm::RegisterRecv("hcp2_gpsimu",Listengpsimu);
|
|
@@ -217,6 +257,8 @@ ADCIntelligentShow::ADCIntelligentShow(QWidget *parent) :
|
|
|
mpapad = iv::modulecomm::RegisterSend("pad",1000,1);
|
|
|
|
|
|
|
|
|
+#endif
|
|
|
+
|
|
|
connect(this,SIGNAL(signalGPSIMU()),this,SLOT(onUpdateGPSIMU()));
|
|
|
connect(this,SIGNAL(signalbrainstate()),this,SLOT(onUpdateBrainState()));
|
|
|
connect(this,SIGNAL(signaldection()),this,SLOT(onUpdateDection()));
|
|
@@ -232,7 +274,7 @@ ADCIntelligentShow::ADCIntelligentShow(QWidget *parent) :
|
|
|
ui->pushButton_go->setStyleSheet("background: green; color: white;");
|
|
|
ui->pushButton_prestation->setStyleSheet("background: green; color: white;");
|
|
|
ui->pushButton_nextstation->setStyleSheet("background: green; color: white;");
|
|
|
- ui->label_station->setStyleSheet("background: transparent; color: white;");
|
|
|
+ ui->label_station->setStyleSheet("background: transparent; color: white;font: 15pt 'Arial';");
|
|
|
ui->label_station->setText("");
|
|
|
|
|
|
if(gvectorpos.size()>0)
|
|
@@ -275,12 +317,19 @@ void ADCIntelligentShow::resizeEvent(QResizeEvent *event)
|
|
|
(void)event;
|
|
|
QSize sizemain = ui->centralWidget->size();
|
|
|
ui->widget_2->setGeometry(730,0,sizemain.width()-730,sizemain.height()-0);
|
|
|
- myview->setGeometry(0,100,sizemain.width()-730-0,sizemain.height()-100);
|
|
|
+ myview->setGeometry(0,150,sizemain.width()-730-0,sizemain.height()-150);
|
|
|
|
|
|
+#ifndef Android
|
|
|
ui->pushButton_prestation->setGeometry(50,30,100,50);
|
|
|
ui->label_station->setGeometry(160,30,200,50);
|
|
|
ui->pushButton_nextstation->setGeometry(380,30,100,50);
|
|
|
ui->pushButton_go->setGeometry(490,30,100,50);
|
|
|
+#else
|
|
|
+ ui->pushButton_prestation->setGeometry(50,30,200,100);
|
|
|
+ ui->label_station->setGeometry(260,30,400,100);
|
|
|
+ ui->pushButton_nextstation->setGeometry(680,30,200,100);
|
|
|
+ ui->pushButton_go->setGeometry(990,30,200,100);
|
|
|
+#endif
|
|
|
|
|
|
}
|
|
|
|
|
@@ -309,7 +358,12 @@ void ADCIntelligentShow::on_pushButton_clicked()
|
|
|
char * str = new char[nsize];
|
|
|
if(xhmi.SerializeToArray(str,1000))
|
|
|
{
|
|
|
+#ifndef Android
|
|
|
iv::modulecomm::ModuleSendMsg(mpapad,str,nsize);
|
|
|
+#else
|
|
|
+ ggt->UpdateData(str,nsize,"pad");
|
|
|
+#endif
|
|
|
+
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -572,265 +626,7 @@ void ADCIntelligentShow::paintEvent(QPaintEvent *)
|
|
|
myview->show();
|
|
|
}
|
|
|
return;
|
|
|
- //painter_background->drawPixmap(0, 0, this->width(), this->height(), QPixmap(":/new/pic/background1.png"));
|
|
|
- // painter->drawPixmap(0, 0, this->width(), this->height(), QPixmap(":/new/pic/background2.jpg"));
|
|
|
-
|
|
|
- //qDebug() << "size:" << navigation_data.size();
|
|
|
-
|
|
|
- if (navigation_data.size()>0)
|
|
|
- {
|
|
|
|
|
|
- //qDebug("++++++++++++++++++");
|
|
|
- painter->begin(image);
|
|
|
- image->fill(QColor(208,208,208));//对画布进行填充
|
|
|
- painter->setRenderHint(QPainter::Antialiasing, true);//设置反锯齿模式,好看一点
|
|
|
-
|
|
|
- int pointx = 450, pointy = 700;//确定坐标轴起点坐标,这里定义(35,280)
|
|
|
- double x0[22000], y0[22000], lng[22000], x1[22000], y1[22000], x2[22000], y2[22000];
|
|
|
- double xx = 0, yy = 0;
|
|
|
- double sumx = 0, sumy = 0;//, ave_x = 0, ave_y = 0;
|
|
|
- int sizeN = navigation_data.size();
|
|
|
- //int max_x_pos = 0, min_x_pos = 0, max_y_pos = 0, min_y_pos = 0;
|
|
|
- int x_max = 0, y_max = 0;//数组里的最大值
|
|
|
- int x_min = 0x3f3f3f3f, y_min = 0x3f3f3f3f;//inf为 #define inf 0x3f3f3f3f
|
|
|
- double k1, k2;
|
|
|
- QPen pen, penPoint;
|
|
|
-
|
|
|
- //先绘制车位置点及框图
|
|
|
- static const QPointF points1[2] = { QPointF(300, 700), QPointF(600, 700) };
|
|
|
- static const QPointF points2[2] = { QPointF(450, 0), QPointF(450, 900) };
|
|
|
-
|
|
|
- penPoint.setColor(Qt::red);
|
|
|
- penPoint.setWidth(2);
|
|
|
- painter->setPen(penPoint);
|
|
|
- painter->drawPoint(pointx, pointy);
|
|
|
- painter->drawPolyline(points1, 2);
|
|
|
- painter->drawPolyline(points2, 2);
|
|
|
-
|
|
|
- //路径点的预处理
|
|
|
- for (int i = 0; i < sizeN; i++)
|
|
|
- {
|
|
|
- x0[i] = navigation_data[i]->gps_x;
|
|
|
- y0[i] = navigation_data[i]->gps_y;
|
|
|
- lng[i] = navigation_data[i]->ins_heading_angle;
|
|
|
- sumx = sumx + navigation_data[i]->gps_x;
|
|
|
- sumy = sumy + navigation_data[i]->gps_y;
|
|
|
- if (x0[i] > x_max) {
|
|
|
- x_max = x0[i];
|
|
|
- //max_x_pos = i;
|
|
|
- }
|
|
|
- if (x0[i] < x_min) {
|
|
|
- x_min = x0[i];
|
|
|
- //min_x_pos = i;
|
|
|
- }
|
|
|
-
|
|
|
- if (y0[i] > y_max) {
|
|
|
- y_max = y0[i];
|
|
|
- //max_y_pos = i;
|
|
|
- }
|
|
|
- if (y0[i] < y_min) {
|
|
|
- y_min = y0[i];
|
|
|
- //min_y_pos = i;
|
|
|
- }
|
|
|
- }
|
|
|
- //ave_x = sumx / sizeN;
|
|
|
- //ave_y = sumy / sizeN;
|
|
|
-
|
|
|
- //获取到实时 GPS信息,并做路径点的显示更新
|
|
|
- double gps_x = 0.0,gps_y = 0.0;
|
|
|
- if(DataUI->mInfo.gps_lng!=0.0&&DataUI->mInfo.gps_lat != 0.0)
|
|
|
- {
|
|
|
- GaussProjCal(DataUI->mInfo.gps_lng, DataUI->mInfo.gps_lat, &gps_x, &gps_y);
|
|
|
- }
|
|
|
- if (gps_x == 0)
|
|
|
- {
|
|
|
- painter->drawText(rect(), Qt::AlignLeft, QStringLiteral("等待车辆实时GPS位置信息"));
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- x0[0] = gps_x;
|
|
|
- y0[0] = gps_y;
|
|
|
- lng[0] = DataUI->mInfo.gps_inshead;
|
|
|
- }
|
|
|
- //根据标定原点的选取,对路径点进行转化
|
|
|
- for (int i = 1; i < sizeN; i++)
|
|
|
- {
|
|
|
- x0[i] = x0[i] - x0[0];
|
|
|
- y0[i] = y0[i] - y0[0];
|
|
|
- xx = x0[i];
|
|
|
- yy = y0[i];
|
|
|
- x0[i] = xx * cos(lng[0] * PI / 180) - yy * sin(lng[0] * PI / 180);
|
|
|
- y0[i] = xx * sin(lng[0] * PI / 180) + yy * cos(lng[0] * PI / 180);
|
|
|
- k1 = sin((90 + (lng[i] - lng[0])) * PI / 180);
|
|
|
- k2 = cos((90 + (lng[i] - lng[0])) * PI / 180);
|
|
|
- x1[i] = x0[i] + k1 * 5;
|
|
|
- y1[i] = y0[i] + k2 * 5;
|
|
|
- x2[i] = x0[i] - k1 * 5;
|
|
|
- y2[i] = y0[i] - k2 * 5;
|
|
|
- }
|
|
|
-
|
|
|
- double kx = (double)(600) / (abs(y_max - y_min));//x轴的系数
|
|
|
- double ky = (double)(600) / (abs(y_max - y_min));//y方向的比例系数
|
|
|
-
|
|
|
- //距离车正前方10m处画一条线
|
|
|
- static const QPointF points3[2] = { QPointF(0, 700 - 10 * ky), QPointF(900, 700 - 10 * ky) };
|
|
|
- painter->drawPolyline(points3, 2);
|
|
|
-
|
|
|
- //绘制路径点
|
|
|
- penPoint.setColor(Qt::black);
|
|
|
- penPoint.setWidth(1);
|
|
|
-
|
|
|
- for (int i = 1; i < sizeN - 1; i++)
|
|
|
- {
|
|
|
- painter->setPen(penPoint);//蓝色的笔,用于标记各个点
|
|
|
- painter->drawPoint(pointx + x0[i] * kx, pointy - y0[i] * ky);
|
|
|
- painter->drawPoint(pointx + x1[i] * kx, pointy - y1[i] * ky);
|
|
|
- painter->drawPoint(pointx + x2[i] * kx, pointy - y2[i] * ky);
|
|
|
- }
|
|
|
- painter->drawPoint(pointx + x0[sizeN - 1] * kx, pointy - y0[sizeN - 1] * ky);//绘制最后一个点
|
|
|
-
|
|
|
- penPoint.setColor(Qt::red);
|
|
|
- penPoint.setWidth(2);
|
|
|
-
|
|
|
- painter->drawPoint(pointx + x0[0] * kx, pointy - y0[0] * ky);
|
|
|
-
|
|
|
- QPixmap pix;
|
|
|
- //pix.load("car.png");
|
|
|
- pix.load(":/new/pic/car.png");
|
|
|
- painter->drawPixmap(435,667,30,67,pix);
|
|
|
-
|
|
|
- penPoint.setColor(Qt::blue);
|
|
|
- penPoint.setWidth(3);
|
|
|
- painter->setPen(penPoint);
|
|
|
-
|
|
|
- QFont font;
|
|
|
- font.setFamily("Microsoft YaHei");
|
|
|
- font.setPointSize(50);
|
|
|
- font.setItalic(true);
|
|
|
- painter->setFont(font);
|
|
|
-
|
|
|
- //////////////////////////////////////
|
|
|
- // 显示毫米波雷达和激光雷达的信息 //
|
|
|
- //////////////////////////////////////
|
|
|
-
|
|
|
- painter->setPen(QPen(Qt::black, 2));
|
|
|
- painter->setBrush(Qt::yellow);
|
|
|
- QFont esr_font("Microsoft YaHei", 10, 75); //第一个属性是字体(微软雅黑),第二个是大小,第三个是加粗(权重是75)
|
|
|
- painter->setFont(esr_font);
|
|
|
- char coordinate_ear[20];
|
|
|
- for (int a = 0; a < 64; a++)
|
|
|
- {
|
|
|
- if(DataUI->mInfo.point[a]!=0)
|
|
|
- {
|
|
|
- painter->drawEllipse(DataUI->mInfo.point[a] * 10 + 450, -DataUI->mInfo.point[a+64] * 10 + 700, 10, 10);
|
|
|
- sprintf(coordinate_ear, "(%d, %d)", (int)DataUI->mInfo.point[a], (int)DataUI->mInfo.point[a+64]);
|
|
|
- painter->drawText(DataUI->mInfo.point[a] * 10 + 450, -DataUI->mInfo.point[a+64] * 10 + 700, QString(coordinate_ear));
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //send alarm
|
|
|
- for (int a = 0; a < 64; a++)
|
|
|
- {
|
|
|
- if(DataUI->mInfo.point[a]!=0)
|
|
|
- {
|
|
|
- float x = DataUI->mInfo.point[a];
|
|
|
- float y = DataUI->mInfo.point[a+64];
|
|
|
- if((y > 0 && y < 2) || ((x*x + y*y) < 25))
|
|
|
- {
|
|
|
- emit sigAlarm();
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //ServiceLidar.copylidarto(Lidar_read); //激光雷达障碍物
|
|
|
- //ServiceLidar.copylidarobsto(Lidar_obsread);
|
|
|
- painter->setPen(QPen(Qt::red, 2));
|
|
|
- for (unsigned int x = 0; x <mlidarpoint.lidar_size; x++)
|
|
|
- {
|
|
|
- painter->drawPoint(mlidarpoint.lidar_point[x]* 10 + 450, -mlidarpoint.lidar_point[x+5000]* 10 + 700);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /* painter->setPen(QColor(255,0,0));
|
|
|
- for (unsigned int x = 0; x < Lidar_obsread->size(); x++)
|
|
|
- {
|
|
|
- painter->drawPoint(((*Lidar_obsread)[x].nomal_x) * 10 + 450, -(*Lidar_obsread)[x].nomal_y * 10 + 700);
|
|
|
- }*/
|
|
|
-
|
|
|
- /////////////////////////////////
|
|
|
- // 实时状态信息显示 //
|
|
|
- ////////////////////////////////
|
|
|
- /* QString is_ok;
|
|
|
- ui->lineEdit->setText(QString::number(ServiceCarStatus.location->rtk_status));//rtk状态
|
|
|
- if(ServiceCarStatus.location->rtk_status==6)ui->push_10->setStyleSheet("background-color: green");
|
|
|
- else ui->pushButton_10->setStyleSheet("background-color: red");
|
|
|
- ui->lineEdit_2->setText(QString::number(ServiceCarStatus.location->ins_status));//ins状态
|
|
|
- if(ServiceCarStatus.location->ins_status==4)ui->pushButton_11->setStyleSheet("background-color: green");
|
|
|
- else ui->pushButton_11->setStyleSheet("background-color: red");
|
|
|
- is_ok = (ServiceCanUtil.did_radar_ok() == true)?QStringLiteral("ok"):QStringLiteral("error");
|
|
|
- ui->lineEdit_3->setText(is_ok);//毫米波雷达状态
|
|
|
- if(ServiceCanUtil.did_radar_ok() == true)ui->pushButton_12->setStyleSheet("background-color: green");
|
|
|
- else ui->pushButton_12->setStyleSheet("background-color:red");
|
|
|
- is_ok = (ServiceLidar.did_lidar_ok() == true)?QStringLiteral("ok"):QStringLiteral("error");
|
|
|
- ui->lineEdit_4->setText(is_ok);//激光雷达状态
|
|
|
- if(ServiceLidar.did_lidar_ok() == true)ui->pushButton_13->setStyleSheet("background-color: green");
|
|
|
- else ui->pushButton_13->setStyleSheet("background-color:red");
|
|
|
- ui->lineEdit_5->setText(QString::number(brain->decision_period)+QStringLiteral("ms"));//决策周期
|
|
|
- if(brain->decision_period>0)ui->pushButton_14->setStyleSheet("background-color: green");
|
|
|
- else ui->pushButton_14->setStyleSheet("background-color:red");
|
|
|
-
|
|
|
- /////////////////////////////////
|
|
|
- // 实时显示障碍物状态 //
|
|
|
- /////////////////////////////////
|
|
|
- //if(brain->look7>90.0||brain->look7==0.0)ui->label_13->setText(QString("前方没有障碍物"));
|
|
|
- //else ui->label_13->setText("前方"+QString::number(brain->look7)+"米处有障碍物");
|
|
|
-
|
|
|
- /////////////////////////////////
|
|
|
- // 模式选择标志置位 //
|
|
|
- ////////////////////////////////
|
|
|
- if(ui->checkBox->isChecked()==true)ServiceControlStatus.change_line = 1;//是否换道标志
|
|
|
- else ServiceControlStatus.change_line = 0;
|
|
|
- if(ui->checkBox_2->isChecked()==true)ServiceControlStatus.stop_obstacle = 1;//是否停障标志
|
|
|
- else ServiceControlStatus.stop_obstacle = 0;
|
|
|
- if(ui->checkBox_3->isChecked()==true)ServiceControlStatus.elude_obstacle = 1;//是否避障标志
|
|
|
- else ServiceControlStatus.elude_obstacle = 0;
|
|
|
- if(ui->checkBox_4->isChecked()==true)ServiceControlStatus.special_signle = 1;//是否特殊信号输入标志
|
|
|
- else ServiceControlStatus.special_signle = 0;
|
|
|
- if(ui->checkBox_5->isChecked()==true)ServiceControlStatus.car_pullover = 1;//是否靠边停车标志位
|
|
|
- else ServiceControlStatus.car_pullover = 0;*/
|
|
|
-
|
|
|
- painter->end();
|
|
|
- scene->clear();
|
|
|
- scene->addPixmap(QPixmap::fromImage(*image));
|
|
|
- myview->setScene(scene);
|
|
|
- myview->show();
|
|
|
- // navigation_data.clear();
|
|
|
-
|
|
|
- }
|
|
|
- //叫车模式选择
|
|
|
- if(ui->checkBox->isChecked())
|
|
|
- {
|
|
|
- int xRun = 3;
|
|
|
- socket->writeDatagram((char *)&xRun,4,QHostAddress::Broadcast,9998);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- int xRun = 4;
|
|
|
- socket->writeDatagram((char *)&xRun,4,QHostAddress::Broadcast,9998);
|
|
|
- }
|
|
|
-
|
|
|
- //编队模式选择
|
|
|
- if(ui->checkBox_2->isChecked())
|
|
|
- {
|
|
|
- int xRun = 5;
|
|
|
- socket->writeDatagram((char *)&xRun,4,QHostAddress::Broadcast,9998);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- int xRun = 6;
|
|
|
- socket->writeDatagram((char *)&xRun,4,QHostAddress::Broadcast,9998);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1002,7 +798,11 @@ void ADCIntelligentShow::on_pushButton_2_clicked()
|
|
|
char * str = new char[nsize];
|
|
|
if(xhmi.SerializeToArray(str,1000))
|
|
|
{
|
|
|
+#ifndef Android
|
|
|
iv::modulecomm::ModuleSendMsg(mpapad,str,nsize);
|
|
|
+#else
|
|
|
+ ggt->UpdateData(str,nsize,"pad");
|
|
|
+#endif
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1082,7 +882,7 @@ void ADCIntelligentShow::onUpdateGPSIMU()
|
|
|
void ADCIntelligentShow::UpdateMap(const char *mapdata, const int mapdatasize)
|
|
|
{
|
|
|
std::cout<<"update map "<<std::endl;
|
|
|
- int gpsunitsize = sizeof(iv::GPS_INS);
|
|
|
+ int gpsunitsize = sizeof(iv::MAP_GPS_INS);
|
|
|
int nMapSize = mapdatasize/gpsunitsize;
|
|
|
// std::cout<<"map size is "<<nMapSize<<std::endl;
|
|
|
|
|
@@ -1095,8 +895,8 @@ void ADCIntelligentShow::UpdateMap(const char *mapdata, const int mapdatasize)
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- iv::GPS_INS * p = (iv::GPS_INS *)mapdata;
|
|
|
- if((p->gps_lat == navigation_data.at(0)->gps_lat)&&(p->ins_heading_angle == navigation_data.at(0)->ins_heading_angle))
|
|
|
+ iv::MAP_GPS_INS * p = (iv::MAP_GPS_INS *)mapdata;
|
|
|
+ if((p->gps_lat == navigation_data.at(0).gps_lat)&&(p->ins_heading_angle == navigation_data.at(0).ins_heading_angle))
|
|
|
{
|
|
|
// qDebug("same map");
|
|
|
bUpdate = false;
|
|
@@ -1115,11 +915,9 @@ void ADCIntelligentShow::UpdateMap(const char *mapdata, const int mapdatasize)
|
|
|
navigation_data.clear();
|
|
|
for(i=0;i<nMapSize;i++)
|
|
|
{
|
|
|
- iv::GPS_INS x;
|
|
|
+ iv::MAP_GPS_INS x;
|
|
|
memcpy(&x,mapdata + i*gpsunitsize,gpsunitsize);
|
|
|
- iv::GPSData data(new iv::GPS_INS);
|
|
|
- *data = x;
|
|
|
- navigation_data.push_back(data);
|
|
|
+ navigation_data.push_back(x);
|
|
|
}
|
|
|
|
|
|
mpivmapview->setmap(navigation_data);
|
|
@@ -1261,5 +1059,9 @@ void ADCIntelligentShow::on_pushButton_go_clicked()
|
|
|
xo.flat = gvectorpos[mnStationIndex].mflat;
|
|
|
xo.lane = 3;
|
|
|
|
|
|
+#ifndef Android
|
|
|
iv::modulecomm::ModuleSendMsg(mpadst,(char *)&xo,sizeof(xodrobj));
|
|
|
+#else
|
|
|
+ ggt->UpdateData((char *)&xo,sizeof(xodrobj),"xodrreq");
|
|
|
+#endif
|
|
|
}
|