|
@@ -224,6 +224,16 @@ ADCIntelligentVehicle::ADCIntelligentVehicle(QWidget *parent)
|
|
|
}
|
|
|
*/
|
|
|
|
|
|
+ QString strpath = QCoreApplication::applicationDirPath();
|
|
|
+ strpath = strpath + "/ui_ads_hmi.xml";
|
|
|
+ iv::xmlparam::Xmlparam xp(strpath.toStdString());
|
|
|
+ ServiceCarStatus.esr_y_offset = atof(xp.GetParam("esr_y_offset","2.5").data());
|
|
|
+ ServiceCarStatus.lidar_y_offset = atof(xp.GetParam("lidar_y_offset","0").data());
|
|
|
+
|
|
|
+
|
|
|
+// givlog->info("brain.");
|
|
|
+
|
|
|
+ gstrmemradar = xp.GetParam("radar","radar");
|
|
|
|
|
|
|
|
|
|
|
@@ -1188,9 +1198,9 @@ void ADCIntelligentVehicle::paintEvent(QPaintEvent *)
|
|
|
{
|
|
|
if (xradararray.obj(a).bvalid())
|
|
|
{
|
|
|
- painter->drawEllipse(xradararray.obj(a).x() * 10 + 450, -((xradararray.obj(a).y() + 3.2) * 10) + 700, 10, 10);
|
|
|
+ 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() +3.2 ) * 10) + 700, QString(coordinate_ear));
|
|
|
+ painter->drawText(xradararray.obj(a).x() * 10 + 450, -((xradararray.obj(a).y() + ServiceCarStatus.esr_y_offset ) * 10) + 700, QString(coordinate_ear));
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -1208,7 +1218,7 @@ void ADCIntelligentVehicle::paintEvent(QPaintEvent *)
|
|
|
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);
|
|
|
+ painter->drawPoint(((*Lidar_obsread)[x].nomal_x) * 10 + 450, -((*Lidar_obsread)[x].nomal_y + ServiceCarStatus.lidar_y_offset) * 10 + 700);
|
|
|
}
|
|
|
|
|
|
|