|
@@ -6,7 +6,7 @@
|
|
|
|
|
|
#include "mainwindowleft.h"
|
|
#include "mainwindowleft.h"
|
|
|
|
|
|
-MainWindow * gw;
|
|
|
|
|
|
+static MainWindow * gw;
|
|
|
|
|
|
extern MainWindowLeft * gwleft,*gwright;
|
|
extern MainWindowLeft * gwleft,*gwright;
|
|
//#include "QStringLiteral"
|
|
//#include "QStringLiteral"
|
|
@@ -19,12 +19,12 @@ extern MainWindowLeft * gwleft,*gwright;
|
|
#include <opencv2/opencv.hpp>
|
|
#include <opencv2/opencv.hpp>
|
|
#include <opencv2/core.hpp>
|
|
#include <opencv2/core.hpp>
|
|
|
|
|
|
-iv::gps::gpsimu ggpsimu;
|
|
|
|
-qint64 gTimeGPSIMUUpdate = 0;
|
|
|
|
|
|
+static iv::gps::gpsimu ggpsimu;
|
|
|
|
+static qint64 gTimeGPSIMUUpdate = 0;
|
|
|
|
|
|
-iv::vision::rawpic grawpic[CAMERA_NUM];
|
|
|
|
-qint64 gTimeRawPic[CAMERA_NUM] = {0,0,0,0};
|
|
|
|
-QMutex gMutexPic[CAMERA_NUM];
|
|
|
|
|
|
+static iv::vision::rawpic grawpic[CAMERA_NUM];
|
|
|
|
+//static qint64 gTimeRawPic[CAMERA_NUM] = {0,0,0,0};
|
|
|
|
+static QMutex gMutexPic[CAMERA_NUM];
|
|
|
|
|
|
extern std::string gstrmem_gpsimu;
|
|
extern std::string gstrmem_gpsimu;
|
|
extern std::string gstrmem_pic[CAMERA_NUM];
|
|
extern std::string gstrmem_pic[CAMERA_NUM];
|
|
@@ -57,18 +57,20 @@ struct simpletrace
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
-std::vector<iv::simpletrace> gvectorsimplerace;
|
|
|
|
-QMutex gMutexTrace;
|
|
|
|
-qint64 gTimeTrace = 0;
|
|
|
|
|
|
+static std::vector<iv::simpletrace> gvectorsimplerace;
|
|
|
|
+static QMutex gMutexTrace;
|
|
|
|
+static qint64 gTimeTrace = 0;
|
|
|
|
|
|
|
|
|
|
-void * gpaframe;
|
|
|
|
|
|
+static void * gpaframe;
|
|
|
|
|
|
MainWindow::MainWindow(QWidget *parent)
|
|
MainWindow::MainWindow(QWidget *parent)
|
|
: QMainWindow(parent)
|
|
: QMainWindow(parent)
|
|
, ui(new Ui::MainWindowCenter)
|
|
, ui(new Ui::MainWindowCenter)
|
|
{
|
|
{
|
|
|
|
|
|
|
|
+ //Load Language
|
|
|
|
+
|
|
m_translator = new QTranslator(this);
|
|
m_translator = new QTranslator(this);
|
|
QString strLanguageFile = ":/zh_CN.qm";
|
|
QString strLanguageFile = ":/zh_CN.qm";
|
|
if(ServiceRCIni.GetLanguage() == "Chinese")
|
|
if(ServiceRCIni.GetLanguage() == "Chinese")
|
|
@@ -86,13 +88,14 @@ MainWindow::MainWindow(QWidget *parent)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ ui->setupUi(this);
|
|
gpaframe = iv::modulecomm::RegisterSend("h264frame",1000000,1);
|
|
gpaframe = iv::modulecomm::RegisterSend("h264frame",1000000,1);
|
|
gw = this;
|
|
gw = this;
|
|
|
|
|
|
- ui->setupUi(this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ //Load Param From .ini
|
|
mstrserverip = ServiceRCIni.GetServerIP();
|
|
mstrserverip = ServiceRCIni.GetServerIP();
|
|
mstrserverport = ServiceRCIni.GetServerPort();
|
|
mstrserverport = ServiceRCIni.GetServerPort();
|
|
mstruploadinterval = ServiceRCIni.GetInterval();
|
|
mstruploadinterval = ServiceRCIni.GetInterval();
|
|
@@ -101,21 +104,22 @@ MainWindow::MainWindow(QWidget *parent)
|
|
mstrctrlMD5 = ServiceRCIni.GetCtrlMD5();
|
|
mstrctrlMD5 = ServiceRCIni.GetCtrlMD5();
|
|
|
|
|
|
|
|
|
|
|
|
+ //Start JoyTick(G29)
|
|
mpJRT = new JoyReadThread();
|
|
mpJRT = new JoyReadThread();
|
|
mpJRT->start();
|
|
mpJRT->start();
|
|
|
|
|
|
- unsigned int i;
|
|
|
|
-
|
|
|
|
CreateView();
|
|
CreateView();
|
|
|
|
|
|
|
|
+ //Add Station
|
|
|
|
+ unsigned int i;
|
|
unsigned int nstation = static_cast<unsigned int>(gvectorpos.size()) ;
|
|
unsigned int nstation = static_cast<unsigned int>(gvectorpos.size()) ;
|
|
for(i=0;i<nstation;i++)
|
|
for(i=0;i<nstation;i++)
|
|
{
|
|
{
|
|
ui->comboBox_Station->addItem(gvectorpos[i].mstrstationname.data());
|
|
ui->comboBox_Station->addItem(gvectorpos[i].mstrstationname.data());
|
|
}
|
|
}
|
|
-
|
|
|
|
ui->radioButton_auto->setChecked(true);
|
|
ui->radioButton_auto->setChecked(true);
|
|
|
|
|
|
|
|
+ //ReomoteCtrl Message
|
|
mpa = iv::modulecomm::RegisterSend("remotectrl",10000,1);
|
|
mpa = iv::modulecomm::RegisterSend("remotectrl",10000,1);
|
|
|
|
|
|
mpTimerManual = new QTimer(this);
|
|
mpTimerManual = new QTimer(this);
|
|
@@ -136,6 +140,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|
mpadst = iv::modulecomm::RegisterSend("xodrreq",1000,1);
|
|
mpadst = iv::modulecomm::RegisterSend("xodrreq",1000,1);
|
|
|
|
|
|
|
|
|
|
|
|
+ //grpc for vehicle Information & Send RemoteCtrl
|
|
mgrpcpc = new grpcpc(gstryaml_path);
|
|
mgrpcpc = new grpcpc(gstryaml_path);
|
|
mgrpcpc->setserverip(mstrserverip);
|
|
mgrpcpc->setserverip(mstrserverip);
|
|
mgrpcpc->setserverport(mstrserverport);
|
|
mgrpcpc->setserverport(mstrserverport);
|
|
@@ -146,6 +151,8 @@ MainWindow::MainWindow(QWidget *parent)
|
|
mgrpcpc->StartRTSP();
|
|
mgrpcpc->StartRTSP();
|
|
mgrpcpc->start();
|
|
mgrpcpc->start();
|
|
|
|
|
|
|
|
+
|
|
|
|
+ //Frame Width & Height
|
|
for(i=0;i<NUM_CAM;i++)
|
|
for(i=0;i<NUM_CAM;i++)
|
|
{
|
|
{
|
|
mpImageCam[i] = new QImage(640, 360, QImage::Format_RGB32);
|
|
mpImageCam[i] = new QImage(640, 360, QImage::Format_RGB32);
|
|
@@ -171,7 +178,6 @@ MainWindow::MainWindow(QWidget *parent)
|
|
|
|
|
|
connect(this,SIGNAL(CamUpdate(int)),this,SLOT(onCamUpdate(int)));
|
|
connect(this,SIGNAL(CamUpdate(int)),this,SLOT(onCamUpdate(int)));
|
|
|
|
|
|
-
|
|
|
|
setWindowTitle(mstrProgName +mstrVIN+ mstrGPSTime + mstrPicTime);
|
|
setWindowTitle(mstrProgName +mstrVIN+ mstrGPSTime + mstrPicTime);
|
|
|
|
|
|
}
|
|
}
|
|
@@ -304,7 +310,7 @@ void MainWindow::resizeEvent(QResizeEvent *event)
|
|
|
|
|
|
|
|
|
|
double fMainRatio = 0.8;
|
|
double fMainRatio = 0.8;
|
|
- mpVehSpeed->setVisible(false);
|
|
|
|
|
|
+
|
|
|
|
|
|
double fVideoRatio = 9.0/16.0;
|
|
double fVideoRatio = 9.0/16.0;
|
|
|
|
|
|
@@ -411,6 +417,11 @@ void MainWindow::resizeEvent(QResizeEvent *event)
|
|
ui->label_gpssat->setGeometry(10,nypos,lablewidth,leheight);
|
|
ui->label_gpssat->setGeometry(10,nypos,lablewidth,leheight);
|
|
ui->lineEdit_gpssat->setGeometry(20+lablewidth,nypos,lewidth,leheight);
|
|
ui->lineEdit_gpssat->setGeometry(20+lablewidth,nypos,lewidth,leheight);
|
|
|
|
|
|
|
|
+ int nvehwidth = speed_width;
|
|
|
|
+ if(nvehwidth>nrearsize_y)nvehwidth = nrearsize_y;
|
|
|
|
+ mpVehSpeed->setVisible(true);
|
|
|
|
+ mpVehSpeed->setGeometry(grouppos_x,0,nvehwidth,nvehwidth);
|
|
|
|
+
|
|
|
|
|
|
double fscale = nfrontsize_x*0.99/mnframewidth;
|
|
double fscale = nfrontsize_x*0.99/mnframewidth;
|
|
double fscale2 = nrearsize_x*0.99/mnframewidth;
|
|
double fscale2 = nrearsize_x*0.99/mnframewidth;
|
|
@@ -475,9 +486,9 @@ void MainWindow::onTimerManual()
|
|
mfWheel = mpJRT->GetWheel() * (-100.0)/32768.0;
|
|
mfWheel = mpJRT->GetWheel() * (-100.0)/32768.0;
|
|
mfAcc = ((mpJRT->GetAcc()-32767.0)/65535)*(-100.0);
|
|
mfAcc = ((mpJRT->GetAcc()-32767.0)/65535)*(-100.0);
|
|
mfBrake = ((mpJRT->GetBrake()-32767.0)/65535)*(-100.0);
|
|
mfBrake = ((mpJRT->GetBrake()-32767.0)/65535)*(-100.0);
|
|
- if(mfWheel != fOldWheel)mpWheel->updatevalue(mfWheel*5.5);
|
|
|
|
- if(mfAcc != fOldAcc)mpAcc->updatevalue(mfAcc);
|
|
|
|
- if(mfBrake != fOldBrake)mpBrake->updatevalue(mfBrake);
|
|
|
|
|
|
+ if(fabs(mfWheel - fOldWheel)>0.0000001)mpWheel->updatevalue(mfWheel*5.5);
|
|
|
|
+ if(fabs(mfAcc - fOldAcc)>0.0000001)mpAcc->updatevalue(mfAcc);
|
|
|
|
+ if(fabs(mfBrake - fOldBrake)>0.0000001)mpBrake->updatevalue(mfBrake);
|
|
|
|
|
|
int x = mpJRT->GetShift();
|
|
int x = mpJRT->GetShift();
|
|
if(x > 0)mnShift = 1;
|
|
if(x > 0)mnShift = 1;
|
|
@@ -516,7 +527,7 @@ void MainWindow::onTimerManual()
|
|
|
|
|
|
if(mPressKeys.contains(Qt::Key_A)&&(mPressKeys.contains((Qt::Key_D))))
|
|
if(mPressKeys.contains(Qt::Key_A)&&(mPressKeys.contains((Qt::Key_D))))
|
|
{
|
|
{
|
|
- mfWheel = mfWheel;
|
|
|
|
|
|
+ mfWheel = mfWheel + 0.0;
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
@@ -552,7 +563,7 @@ void MainWindow::onTimerManual()
|
|
|
|
|
|
if(!mPressKeys.contains(Qt::Key_A)&&(!mPressKeys.contains((Qt::Key_D)))&&(bInKeepMode == false))
|
|
if(!mPressKeys.contains(Qt::Key_A)&&(!mPressKeys.contains((Qt::Key_D)))&&(bInKeepMode == false))
|
|
{
|
|
{
|
|
- if(mfWheel != 0)
|
|
|
|
|
|
+ if(fabs(mfWheel)>0.0)
|
|
{
|
|
{
|
|
if(mfWheel > 0)mfWheel = mfWheel - timediff*mfWheelAutoDownSpeed/1000;
|
|
if(mfWheel > 0)mfWheel = mfWheel - timediff*mfWheelAutoDownSpeed/1000;
|
|
else mfWheel = mfWheel + timediff*mfWheelAutoDownSpeed/1000;
|
|
else mfWheel = mfWheel + timediff*mfWheelAutoDownSpeed/1000;
|
|
@@ -640,14 +651,14 @@ void MainWindow::onTimerManual()
|
|
|
|
|
|
if(!mPressKeys.contains(Qt::Key_W)&&(!mPressKeys.contains((Qt::Key_S)))&&(bInKeepMode == false))
|
|
if(!mPressKeys.contains(Qt::Key_W)&&(!mPressKeys.contains((Qt::Key_S)))&&(bInKeepMode == false))
|
|
{
|
|
{
|
|
- if(mfBrake != 0)
|
|
|
|
|
|
+ if(fabs(mfBrake) >0)
|
|
{
|
|
{
|
|
// mfBrake = mfBrake - timediff*mfBrakeAutoDownSpeed/1000;
|
|
// mfBrake = mfBrake - timediff*mfBrakeAutoDownSpeed/1000;
|
|
// if(mfBrake<0)mfBrake = 0;
|
|
// if(mfBrake<0)mfBrake = 0;
|
|
// if(mfBrake > 100)mfBrake = 100;
|
|
// if(mfBrake > 100)mfBrake = 100;
|
|
}
|
|
}
|
|
|
|
|
|
- if(mfAcc != 0)
|
|
|
|
|
|
+ if(fabs(mfAcc) > 0)
|
|
{
|
|
{
|
|
mfAcc = mfAcc - timediff*mfAccAutoDownSpeed/1000;
|
|
mfAcc = mfAcc - timediff*mfAccAutoDownSpeed/1000;
|
|
if(mfAcc<0)mfAcc = 0;
|
|
if(mfAcc<0)mfAcc = 0;
|
|
@@ -655,9 +666,9 @@ void MainWindow::onTimerManual()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if(mfWheel != fOldWheel)mpWheel->updatevalue(mfWheel*4.5);
|
|
|
|
- if(mfAcc != fOldAcc)mpAcc->updatevalue(mfAcc);
|
|
|
|
- if(mfBrake != fOldBrake)mpBrake->updatevalue(mfBrake);
|
|
|
|
|
|
+ if(fabs(mfWheel - fOldWheel)>0)mpWheel->updatevalue(mfWheel*4.5);
|
|
|
|
+ if(fabs(mfAcc - fOldAcc)>0)mpAcc->updatevalue(mfAcc);
|
|
|
|
+ if(fabs(mfBrake -fOldBrake)>0)mpBrake->updatevalue(mfBrake);
|
|
}
|
|
}
|
|
|
|
|
|
void MainWindow::on_radioButton_auto_clicked()
|
|
void MainWindow::on_radioButton_auto_clicked()
|
|
@@ -695,22 +706,22 @@ void MainWindow::onTimerRemote()
|
|
mremotectrl.set_shift(mnShift);
|
|
mremotectrl.set_shift(mnShift);
|
|
|
|
|
|
|
|
|
|
- int nsersize = mremotectrl.ByteSize();
|
|
|
|
|
|
+ int nsersize = static_cast<int>(mremotectrl.ByteSize()) ;
|
|
char * strbuf = new char[nsersize];
|
|
char * strbuf = new char[nsersize];
|
|
if(mremotectrl.SerializeToArray(strbuf,nsersize))
|
|
if(mremotectrl.SerializeToArray(strbuf,nsersize))
|
|
{
|
|
{
|
|
mgrpcpc->SetCtrlMsg("remotectrl",strbuf,nsersize);
|
|
mgrpcpc->SetCtrlMsg("remotectrl",strbuf,nsersize);
|
|
// iv::modulecomm::ModuleSendMsg(mpa,strbuf,nsersize);
|
|
// iv::modulecomm::ModuleSendMsg(mpa,strbuf,nsersize);
|
|
}
|
|
}
|
|
- delete strbuf;
|
|
|
|
|
|
+ delete [] strbuf;
|
|
}
|
|
}
|
|
|
|
|
|
void MainWindow::onTimerUpdatePic()
|
|
void MainWindow::onTimerUpdatePic()
|
|
{
|
|
{
|
|
- static qint64 time_pic = 0;
|
|
|
|
|
|
+// static qint64 time_pic = 0;
|
|
|
|
|
|
static qint64 time_trace = 0;
|
|
static qint64 time_trace = 0;
|
|
- static int pos = 0;
|
|
|
|
|
|
+// static int pos = 0;
|
|
static std::vector<iv::simpletrace> xvectorsimpletrace;
|
|
static std::vector<iv::simpletrace> xvectorsimpletrace;
|
|
|
|
|
|
|
|
|
|
@@ -722,14 +733,14 @@ void MainWindow::onTimerUpdatePic()
|
|
gMutexTrace.lock();
|
|
gMutexTrace.lock();
|
|
xvectorsimpletrace = gvectorsimplerace;
|
|
xvectorsimpletrace = gvectorsimplerace;
|
|
gMutexTrace.unlock();
|
|
gMutexTrace.unlock();
|
|
- pos = 0;
|
|
|
|
|
|
+ // pos = 0;
|
|
if(xvectorsimpletrace.size()> 0)
|
|
if(xvectorsimpletrace.size()> 0)
|
|
{
|
|
{
|
|
QJsonArray num_json,num2_json; //声明QJsonArray
|
|
QJsonArray num_json,num2_json; //声明QJsonArray
|
|
QJsonDocument num_document,num2_document; //将QJsonArray改为QJsonDocument类
|
|
QJsonDocument num_document,num2_document; //将QJsonArray改为QJsonDocument类
|
|
QByteArray num_byteArray,num2_byteArray; //
|
|
QByteArray num_byteArray,num2_byteArray; //
|
|
|
|
|
|
- int i=0;
|
|
|
|
|
|
+ unsigned int i=0;
|
|
for(i=0;i<xvectorsimpletrace.size();i++) //将数组传入压入num_json
|
|
for(i=0;i<xvectorsimpletrace.size();i++) //将数组传入压入num_json
|
|
{
|
|
{
|
|
num_json.append(xvectorsimpletrace[i].gps_lng);
|
|
num_json.append(xvectorsimpletrace[i].gps_lng);
|
|
@@ -769,15 +780,15 @@ void MainWindow::onTimerUpdateView()
|
|
{
|
|
{
|
|
static qint64 time_gps = 0;
|
|
static qint64 time_gps = 0;
|
|
|
|
|
|
- unsigned int i;
|
|
|
|
|
|
+ // unsigned int i;
|
|
|
|
|
|
char strlatency[1000];
|
|
char strlatency[1000];
|
|
char strtem[100];
|
|
char strtem[100];
|
|
snprintf(strlatency,1000,"Latency(Up|FrameRate|Down): ");
|
|
snprintf(strlatency,1000,"Latency(Up|FrameRate|Down): ");
|
|
- snprintf(strtem,100,"FT(%d|%d|%d) ",mgrpcpc->GetPicLatency(0),mgrpcpc->GetFrameRate(0),mgrpcpc->GetPicDownLatency(0));strncat(strlatency,strtem,1000);
|
|
|
|
- snprintf(strtem,100,"RR(%d|%d|%d) ",mgrpcpc->GetPicLatency(1),mgrpcpc->GetFrameRate(1),mgrpcpc->GetPicDownLatency(1));strncat(strlatency,strtem,1000);
|
|
|
|
- snprintf(strtem,100,"LT(%d|%d|%d) ",mgrpcpc->GetPicLatency(2),mgrpcpc->GetFrameRate(2),mgrpcpc->GetPicDownLatency(2));strncat(strlatency,strtem,1000);
|
|
|
|
- snprintf(strtem,100,"RT(%d|%d|%d) ",mgrpcpc->GetPicLatency(3),mgrpcpc->GetFrameRate(3),mgrpcpc->GetPicDownLatency(3));strncat(strlatency,strtem,1000);
|
|
|
|
|
|
+ snprintf(strtem,100,"FT(%lld|%d|%lld) ",mgrpcpc->GetPicLatency(0),mgrpcpc->GetFrameRate(0),mgrpcpc->GetPicDownLatency(0));strncat(strlatency,strtem,1000);
|
|
|
|
+ snprintf(strtem,100,"RR(%lld|%d|%lld) ",mgrpcpc->GetPicLatency(1),mgrpcpc->GetFrameRate(1),mgrpcpc->GetPicDownLatency(1));strncat(strlatency,strtem,1000);
|
|
|
|
+ snprintf(strtem,100,"LT(%lld|%d|%lld) ",mgrpcpc->GetPicLatency(2),mgrpcpc->GetFrameRate(2),mgrpcpc->GetPicDownLatency(2));strncat(strlatency,strtem,1000);
|
|
|
|
+ snprintf(strtem,100,"RT(%lld|%d|%lld) ",mgrpcpc->GetPicLatency(3),mgrpcpc->GetFrameRate(3),mgrpcpc->GetPicDownLatency(3));strncat(strlatency,strtem,1000);
|
|
|
|
|
|
mpLabelLatency->setText(strlatency);
|
|
mpLabelLatency->setText(strlatency);
|
|
|
|
|
|
@@ -914,12 +925,12 @@ void MainWindow::on_pushButton_Go_clicked()
|
|
if(ui->comboBox_Station->currentIndex() < 0)return;
|
|
if(ui->comboBox_Station->currentIndex() < 0)return;
|
|
int index = ui->comboBox_Station->currentIndex();
|
|
int index = ui->comboBox_Station->currentIndex();
|
|
|
|
|
|
- if(index<0 || index>= gvectorpos.size())
|
|
|
|
|
|
+ if(index<0 || index>= static_cast<int>(gvectorpos.size()) )
|
|
{
|
|
{
|
|
std::cout<<"out range."<<std::endl;
|
|
std::cout<<"out range."<<std::endl;
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- iv::pos_def xpos = gvectorpos[index];
|
|
|
|
|
|
+ iv::pos_def xpos = gvectorpos[static_cast<unsigned int>(index) ];
|
|
|
|
|
|
double lon,lat;
|
|
double lon,lat;
|
|
lon = xpos.mflon;
|
|
lon = xpos.mflon;
|
|
@@ -931,18 +942,18 @@ void MainWindow::on_pushButton_Go_clicked()
|
|
xo.lane = 3;
|
|
xo.lane = 3;
|
|
|
|
|
|
|
|
|
|
- mgrpcpc->SetCtrlMsg("xodrreq",(char *)&xo,sizeof(xodrobj));
|
|
|
|
|
|
+ mgrpcpc->SetCtrlMsg("xodrreq", reinterpret_cast<char *>(&xo),sizeof(xodrobj));
|
|
// iv::modulecomm::ModuleSendMsg(mpadst,(char *)&xo,sizeof(xodrobj));
|
|
// iv::modulecomm::ModuleSendMsg(mpadst,(char *)&xo,sizeof(xodrobj));
|
|
}
|
|
}
|
|
|
|
|
|
void MainWindow::on_comboBox_Station_currentIndexChanged(int index)
|
|
void MainWindow::on_comboBox_Station_currentIndexChanged(int index)
|
|
{
|
|
{
|
|
- if(index<0 || index>= gvectorpos.size())
|
|
|
|
|
|
+ if(index<0 || index>= static_cast<int>(gvectorpos.size()))
|
|
{
|
|
{
|
|
std::cout<<"out range."<<std::endl;
|
|
std::cout<<"out range."<<std::endl;
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- iv::pos_def xpos = gvectorpos[index];
|
|
|
|
|
|
+ iv::pos_def xpos = gvectorpos[static_cast<unsigned int>(index) ];
|
|
|
|
|
|
char strscript[256];
|
|
char strscript[256];
|
|
snprintf(strscript,255,"objLocation(%11.7f,%11.7f);",xpos.mflon,xpos.mflat);
|
|
snprintf(strscript,255,"objLocation(%11.7f,%11.7f);",xpos.mflon,xpos.mflat);
|
|
@@ -953,7 +964,7 @@ void MainWindow::on_comboBox_Station_currentIndexChanged(int index)
|
|
|
|
|
|
void MainWindow::on_checkBox_Drive_stateChanged(int arg1)
|
|
void MainWindow::on_checkBox_Drive_stateChanged(int arg1)
|
|
{
|
|
{
|
|
-
|
|
|
|
|
|
+ (void)arg1;
|
|
}
|
|
}
|
|
|
|
|
|
void MainWindow::on_checkBox_Drive_clicked()
|
|
void MainWindow::on_checkBox_Drive_clicked()
|
|
@@ -1047,6 +1058,7 @@ void MainWindow::threadinfo()
|
|
while(mbThreadrun)
|
|
while(mbThreadrun)
|
|
{
|
|
{
|
|
nrtn = mgrpcpc->GetQueryMsg(xcloudmsg,1000);
|
|
nrtn = mgrpcpc->GetQueryMsg(xcloudmsg,1000);
|
|
|
|
+ std::cout<<" thread info message."<<std::endl;
|
|
if(nrtn == 1)
|
|
if(nrtn == 1)
|
|
{
|
|
{
|
|
int i;
|
|
int i;
|
|
@@ -1056,7 +1068,7 @@ void MainWindow::threadinfo()
|
|
if(punit->msgname() == "hcp2_gpsimu")
|
|
if(punit->msgname() == "hcp2_gpsimu")
|
|
{
|
|
{
|
|
iv::gps::gpsimu xgpsimu;
|
|
iv::gps::gpsimu xgpsimu;
|
|
- if(!xgpsimu.ParseFromArray(punit->data().data(),punit->data().size()))
|
|
|
|
|
|
+ if(!xgpsimu.ParseFromArray(punit->data().data(),static_cast<int>(punit->data().size()) ))
|
|
{
|
|
{
|
|
std::cout<<"ListenRaw Parse error."<<std::endl;
|
|
std::cout<<"ListenRaw Parse error."<<std::endl;
|
|
continue;
|
|
continue;
|
|
@@ -1120,7 +1132,7 @@ void MainWindow::threadpic(int ncampos)
|
|
#endif
|
|
#endif
|
|
mph264decode[ncampos]->UnlockReadBuff(nindex);
|
|
mph264decode[ncampos]->UnlockReadBuff(nindex);
|
|
|
|
|
|
- QImage image2 = QImage((uchar*)(rgbImg.data), rgbImg.cols, rgbImg.rows, QImage::Format_RGB888);
|
|
|
|
|
|
+ QImage image2 = QImage(static_cast<uchar*>(rgbImg.data), rgbImg.cols, rgbImg.rows, QImage::Format_RGB888);
|
|
|
|
|
|
#ifndef TESTH264
|
|
#ifndef TESTH264
|
|
mMutexCam[ncampos].lock();
|
|
mMutexCam[ncampos].lock();
|