|
|
@@ -1036,7 +1036,7 @@ void ADCIntelligentVehicle::paintEvent(QPaintEvent *)
|
|
|
navigation_data = m_navigation_data;
|
|
|
mMutexNavi.unlock();
|
|
|
|
|
|
- std::vector<iv::Point2D> myplan,myplan_left,myplan_right;
|
|
|
+ std::vector<iv::TracePoint> myplan,myplan_left,myplan_right;
|
|
|
mMutexPlan.lock();
|
|
|
myplan = m_plan;
|
|
|
mMutexPlan.unlock();
|
|
|
@@ -1380,12 +1380,12 @@ void ADCIntelligentVehicle::UpdatePlanTrace(const char * strdata,const unsigned
|
|
|
{
|
|
|
mMutexPlan.lock();
|
|
|
m_plan.clear();
|
|
|
- int nplansize = nSize/sizeof(iv::Point2D);
|
|
|
- int npsize = sizeof(iv::Point2D);
|
|
|
+ int nplansize = nSize/sizeof(iv::TracePoint);
|
|
|
+ int npsize = sizeof(iv::TracePoint);
|
|
|
int i;
|
|
|
for(i=0;i<nplansize;i++)
|
|
|
{
|
|
|
- iv::Point2D x;
|
|
|
+ iv::TracePoint x;
|
|
|
memcpy(&x,strdata + i*npsize,npsize);
|
|
|
m_plan.push_back(x);
|
|
|
}
|
|
|
@@ -1396,15 +1396,15 @@ void ADCIntelligentVehicle::UpdatePlanTrace_left(const char * strdata,const unsi
|
|
|
{
|
|
|
mMutexPlan_left.lock();
|
|
|
m_plan_left.clear();
|
|
|
- int nplansize = nSize/sizeof(iv::Point2D);
|
|
|
+ int nplansize = nSize/sizeof(iv::TracePoint);
|
|
|
if(nplansize < 1)
|
|
|
std::cout<<"UpdatePlanTrace_left size is 0................. "<<std::endl;
|
|
|
- // return;
|
|
|
- int npsize = sizeof(iv::Point2D);
|
|
|
+// return;
|
|
|
+ int npsize = sizeof(iv::TracePoint);
|
|
|
int i;
|
|
|
for(i=0;i<nplansize;i++)
|
|
|
{
|
|
|
- iv::Point2D x;
|
|
|
+ iv::TracePoint x;
|
|
|
memcpy(&x,strdata + i*npsize,npsize);
|
|
|
m_plan_left.push_back(x);
|
|
|
}
|
|
|
@@ -1415,14 +1415,14 @@ void ADCIntelligentVehicle::UpdatePlanTrace_right(const char * strdata,const uns
|
|
|
{
|
|
|
mMutexPlan_right.lock();
|
|
|
m_plan_right.clear();
|
|
|
- int nplansize = nSize/sizeof(iv::Point2D);
|
|
|
+ int nplansize = nSize/sizeof(iv::TracePoint);
|
|
|
if(nplansize < 1)
|
|
|
std::cout<<"UpdatePlanTrace_right size is 0................. "<<std::endl;
|
|
|
- int npsize = sizeof(iv::Point2D);
|
|
|
+ int npsize = sizeof(iv::TracePoint);
|
|
|
int i;
|
|
|
for(i=0;i<nplansize;i++)
|
|
|
{
|
|
|
- iv::Point2D x;
|
|
|
+ iv::TracePoint x;
|
|
|
memcpy(&x,strdata + i*npsize,npsize);
|
|
|
m_plan_right.push_back(x);
|
|
|
}
|
|
|
@@ -2110,12 +2110,21 @@ void ADCIntelligentVehicle::UpdateVbox(const char * strdata,const unsigned int n
|
|
|
void ADCIntelligentVehicle::on_button_start_clicked()
|
|
|
{
|
|
|
#ifdef USE_PAD_CTRL
|
|
|
- ServiceCarStatus.mbRunPause = false;
|
|
|
- iv::hmi::HMIBasic hmi;
|
|
|
- hmi.mbBocheMode = false;
|
|
|
- hmi.mbPause = false;
|
|
|
- ShareHMIMsg(hmi);
|
|
|
+ iv::hmi::hmimsg hmi;
|
|
|
+ if(mbPause){
|
|
|
+ ServiceCarStatus.mbRunPause = false;
|
|
|
+ hmi.set_mbpause(false);
|
|
|
+ mbPause = false;
|
|
|
+ ui->button_start->setText("暂停自动驾驶");
|
|
|
+ }else{
|
|
|
+ ServiceCarStatus.mbRunPause = true;
|
|
|
+ hmi.set_mbpause(true);
|
|
|
+ mbPause = true;
|
|
|
+ ui->button_start->setText("启动自动驾驶");
|
|
|
+ }
|
|
|
+ ShareHMIMsgPro(hmi);
|
|
|
return;
|
|
|
+
|
|
|
#endif
|
|
|
}
|
|
|
//云平台使能控制
|