|
@@ -401,73 +401,48 @@ void ADCIntelligentVehicle::timeoutslot()
|
|
|
// 实时状态信息显示 //
|
|
|
////////////////////////////////
|
|
|
QString is_ok;
|
|
|
- ui->lineEdit->setText(QString::number(ServiceCarStatus.location->rtk_status));//rtk状态
|
|
|
- ui->lineEdit_12->setText(QString::number(ServiceCarStatus.location->rtk_status));//rtk状态
|
|
|
+ ui->lineEdit_RTK->setText(QString::number(ServiceCarStatus.location->rtk_status));//rtk状态
|
|
|
if(ServiceCarStatus.location->rtk_status==6)
|
|
|
{
|
|
|
- ui->pushButton_10->setStyleSheet("background-color: green");
|
|
|
- ui->pushButton_23->setStyleSheet("background-color: green");
|
|
|
+ ui->button_RTK_st->setStyleSheet("background-color: green");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- ui->pushButton_10->setStyleSheet("background-color: red");
|
|
|
- ui->pushButton_23->setStyleSheet("background-color: red");
|
|
|
+ ui->button_RTK_st->setStyleSheet("background-color: red");
|
|
|
}
|
|
|
|
|
|
- ui->lineEdit_2->setText(QString::number(ServiceCarStatus.location->ins_status));//ins状态
|
|
|
+ ui->lineEdit_INS->setText(QString::number(ServiceCarStatus.location->ins_status));//ins状态
|
|
|
if(ServiceCarStatus.location->ins_status==4)
|
|
|
- ui->pushButton_11->setStyleSheet("background-color: green");
|
|
|
+ ui->button_INS_st->setStyleSheet("background-color: green");
|
|
|
else
|
|
|
- ui->pushButton_11->setStyleSheet("background-color: red");
|
|
|
-
|
|
|
- is_ok = (ServiceCarStatus.mRadarS>0)?QStringLiteral("ok"):QStringLiteral("error");
|
|
|
- ui->lineEdit_3->setText(is_ok);//毫米波雷达状态
|
|
|
- ui->lineEdit_15->setText(is_ok);//毫米波雷达状态
|
|
|
-
|
|
|
- if(ServiceCarStatus.mRadarS>0)
|
|
|
- {
|
|
|
- ui->pushButton_12->setStyleSheet("background-color: green");
|
|
|
- ui->pushButton_25->setStyleSheet("background-color: green");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ui->pushButton_12->setStyleSheet("background-color:red");
|
|
|
- ui->pushButton_25->setStyleSheet("background-color:red");
|
|
|
- }
|
|
|
+ ui->button_INS_st->setStyleSheet("background-color: red");
|
|
|
|
|
|
is_ok = (ServiceCarStatus.mLidarS>0)?QStringLiteral("ok"):QStringLiteral("error");
|
|
|
- ui->lineEdit_4->setText(is_ok);//激光雷达状态
|
|
|
- ui->lineEdit_16->setText(is_ok);//激光雷达状态
|
|
|
+ ui->lineEdit_lidar->setText(is_ok);//激光雷达状态
|
|
|
if(ServiceCarStatus.mLidarS>0)
|
|
|
{
|
|
|
- ui->pushButton_13->setStyleSheet("background-color: green");
|
|
|
- ui->pushButton_26->setStyleSheet("background-color: green");
|
|
|
+ ui->button_lidar_st->setStyleSheet("background-color: green");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- ui->pushButton_13->setStyleSheet("background-color:red");
|
|
|
- ui->pushButton_26->setStyleSheet("background-color:red");
|
|
|
+ ui->button_lidar_st->setStyleSheet("background-color:red");
|
|
|
}
|
|
|
|
|
|
- ui->lineEdit_5->setText(QString::number(mdecition_period)+QStringLiteral("ms"));//决策周期
|
|
|
- ui->lineEdit_17->setText(QString::number(mdecition_period)+QStringLiteral("ms"));//决策周期
|
|
|
+ ui->lineEdit_dec_period->setText(QString::number(mdecition_period)+QStringLiteral("ms"));//决策周期
|
|
|
if(mdecition_period>0)
|
|
|
{
|
|
|
- ui->pushButton_14->setStyleSheet("background-color: green");
|
|
|
- ui->pushButton_27->setStyleSheet("background-color: green");
|
|
|
+ ui->button_decition_st->setStyleSheet("background-color: green");
|
|
|
}
|
|
|
|
|
|
if((mTimeState.elapsed()-mnTimeUpdateGPS) > 1000)
|
|
|
{
|
|
|
- ui->pushButton_10->setStyleSheet("background-color: red");
|
|
|
- ui->pushButton_11->setStyleSheet("background-color: red");
|
|
|
- ui->pushButton_23->setStyleSheet("background-color: red");
|
|
|
+ ui->button_RTK_st->setStyleSheet("background-color: red");
|
|
|
+ ui->button_INS_st->setStyleSheet("background-color: red");
|
|
|
}
|
|
|
|
|
|
if((mTimeState.elapsed() - mnTimeUpdateDecition)>1000)
|
|
|
{
|
|
|
- ui->pushButton_14->setStyleSheet("background-color:red");
|
|
|
- ui->pushButton_27->setStyleSheet("background-color:red");
|
|
|
+ ui->button_decition_st->setStyleSheet("background-color:red");
|
|
|
ui->label_decition->setText("No decition");
|
|
|
mbBrainRunning = false;
|
|
|
}
|
|
@@ -698,21 +673,6 @@ void ADCIntelligentVehicle::AutoStart()
|
|
|
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * @brief ADCIntelligentVehicle::on_pb_start_all_clicked
|
|
|
- */
|
|
|
-void ADCIntelligentVehicle::on_pb_start_all_clicked() {
|
|
|
-
|
|
|
-#ifdef USE_PAD_CTRL
|
|
|
- ServiceCarStatus.mbRunPause = false;
|
|
|
- iv::hmi::HMIBasic hmi;
|
|
|
- hmi.mbBocheMode = false;
|
|
|
- hmi.mbPause = false;
|
|
|
- ShareHMIMsg(hmi);
|
|
|
- return;
|
|
|
-#endif
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* @brief ADCIntelligentVehicle::on_pb_open_can_card_clicked
|
|
|
*/
|
|
@@ -1070,35 +1030,7 @@ void ADCIntelligentVehicle::paintEvent(QPaintEvent *)
|
|
|
// //
|
|
|
//////////////////////////////////////
|
|
|
|
|
|
- if(ui->checkBox_8->isChecked())
|
|
|
- {
|
|
|
- painter->setPen(QPen(Qt::black, 2));
|
|
|
- painter->setBrush(Qt::blue);
|
|
|
- QFont esr_font("Microsoft YaHei", 10, 75); //第一个属性是字体(微软雅黑),第二个是大小,第三个是加粗(权重是75)
|
|
|
- painter->setFont(esr_font);
|
|
|
- char coordinate_ear[100];
|
|
|
- iv::radar::radarobjectarray xradararray;
|
|
|
- if(mbradarUpdate)
|
|
|
- {
|
|
|
- mMutexRadar.lock();
|
|
|
- xradararray.CopyFrom(mradararray);
|
|
|
- mMutexRadar.unlock();
|
|
|
- for (int a = 0; a < xradararray.obj_size(); a++)
|
|
|
- {
|
|
|
- if (xradararray.obj(a).bvalid())
|
|
|
- {
|
|
|
- painter->drawEllipse(xradararray.obj(a).x() * 10 + 450, -((xradararray.obj(a).y() + ServiceCarStatus.esr_y_offset) * 10) + 700, 10, 10);
|
|
|
- sprintf(coordinate_ear, "(%d, %d)", (int)xradararray.obj(a).x(), (int)xradararray.obj(a).y());
|
|
|
- painter->drawText(xradararray.obj(a).x() * 10 + 450, -((xradararray.obj(a).y() + ServiceCarStatus.esr_y_offset ) * 10) + 700, QString(coordinate_ear));
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- // mbradarUpdate = false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- if(ui->checkBox_9->isChecked())
|
|
|
+ if(ui->checkBox_lidar_show->isChecked())
|
|
|
{
|
|
|
ServiceLidar.copylidarto(Lidar_read); //激光雷达障碍物
|
|
|
ServiceLidar.copylidarobsto(Lidar_obsread);
|
|
@@ -1121,7 +1053,7 @@ void ADCIntelligentVehicle::paintEvent(QPaintEvent *)
|
|
|
// //
|
|
|
//////////////////////////////////////
|
|
|
|
|
|
- if(ui->checkBox_10->isChecked())
|
|
|
+ if(ui->checkBox_fusion_show->isChecked())
|
|
|
{
|
|
|
painter->setPen(QColor(255,0,0));
|
|
|
iv::fusion::fusionobjectarray xfusionarray;
|
|
@@ -1819,22 +1751,6 @@ void ADCIntelligentVehicle::onCtrlManual(bool bCtrl)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void ADCIntelligentVehicle::on_pb_v2xEn_clicked()
|
|
|
-{
|
|
|
- qDebug()<<mv2xStEn;
|
|
|
- if(mv2xStEn){
|
|
|
- ui->pb_v2xEn->setText("云平台控制:关");
|
|
|
- mv2xStEn = 0;
|
|
|
- }
|
|
|
- else{
|
|
|
- ui->pb_v2xEn->setText("云平台控制:开");
|
|
|
- mv2xStEn = 1;
|
|
|
- }
|
|
|
- gIvlog->info("hmi","v2x enable:%d", mv2xStEn);
|
|
|
- UpdateV2xStEn(mv2xStEn);
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
void ADCIntelligentVehicle::shareMapReqMsg()
|
|
|
{
|
|
|
|
|
@@ -1873,3 +1789,49 @@ void ADCIntelligentVehicle::UpdateVbox(const char * strdata,const unsigned int n
|
|
|
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+void ADCIntelligentVehicle::on_button_platform_en_clicked()
|
|
|
+{
|
|
|
+ if(mv2xStEn){
|
|
|
+ ui->button_platform_en->setStyleSheet("background-color: grey");
|
|
|
+ mv2xStEn = 0;
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ ui->button_platform_en->setStyleSheet("background-color: green");
|
|
|
+ mv2xStEn = 1;
|
|
|
+ }
|
|
|
+ gIvlog->info("hmi","v2x enable:%d", mv2xStEn);
|
|
|
+ UpdateV2xStEn(mv2xStEn);
|
|
|
+}
|
|
|
+
|
|
|
+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);
|
|
|
+ return;
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+void ADCIntelligentVehicle::on_button_obu_en_clicked()
|
|
|
+{
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+void ADCIntelligentVehicle::on_button_map_set_clicked()
|
|
|
+{
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+void ADCIntelligentVehicle::on_button_vin_set_clicked()
|
|
|
+{
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+void ADCIntelligentVehicle::on_button_speedLimit_set_clicked()
|
|
|
+{
|
|
|
+
|
|
|
+}
|