This commit is contained in:
hm
2022-10-09 14:57:48 +08:00
parent 4545b99f18
commit 3fdadf74dd
9 changed files with 49 additions and 15 deletions
+25 -3
View File
@@ -45,9 +45,9 @@ StatusUI::StatusUI(QWidget *parent) :
install(base,0,"导航模式",0,
QMap<QVariant, StateWidget::state>{{"未初始化",StateWidget::state::gray},
{"纯惯导",StateWidget::state::orange},
{"惯性/卫星",StateWidget::state::green},
{"惯性/差分卫星",StateWidget::state::green},
{"纯惯导",StateWidget::state::red},
{"惯性/卫星",StateWidget::state::orange},
{"惯性/差分",StateWidget::state::green},
{"预留",StateWidget::state::red}});
@@ -163,6 +163,28 @@ StatusUI::StatusUI(QWidget *parent) :
{5,StateWidget::state::orange},
{10,StateWidget::state::red}});
install(battery,0,"左刹车油压[MPa]",0,
QMap<QVariant, StateWidget::state>{{0,StateWidget::state::green},
{0.8,StateWidget::state::green},
{1,StateWidget::state::orange}});
install(battery,0,"右刹车油压[MPa]",0,
QMap<QVariant, StateWidget::state>{{0,StateWidget::state::green},
{0.8,StateWidget::state::green},
{1,StateWidget::state::orange}});
install(battery,0,"起落架气压[MPa]",0,
QMap<QVariant, StateWidget::state>{{0,StateWidget::state::red},
{3,StateWidget::state::red},
{5,StateWidget::state::orange},
{10,StateWidget::state::green}});
install(battery,0,"左轮速[RPM]",0,
QMap<QVariant, StateWidget::state>{{1,StateWidget::state::red},
{120,StateWidget::state::green}});
install(battery,0,"右轮速[RPM]",0,
QMap<QVariant, StateWidget::state>{{1,StateWidget::state::red},
{120,StateWidget::state::green}});
install(communication,0,"信号[%]",0,
QMap<QVariant, StateWidget::state>{{50,StateWidget::state::red},
@@ -195,8 +195,8 @@ void landinggear::gear_Info(Parse::_gear info)
setColor(ui->checkBox_24,(info.SW[23])?(state::inital):(state::success));
ui->lineEdit_p1->setText(QString::number(info.LeftPressure,'f',3));
ui->lineEdit_p2->setText(QString::number(info.RightPressure,'f',3));
ui->lineEdit_p3->setText(QString::number(info.AirPressure,'f',3));
ui->lineEdit_p2->setText(QString::number(info.AirPressure,'f',3));
ui->lineEdit_p3->setText(QString::number(info.RightPressure,'f',3));
ui->lineEdit_rpm1->setText(QString::number(info.LeftWheel,'f',0));
ui->lineEdit_rpm2->setText(QString::number(info.RightWheel,'f',0));
ui->lineEdit_rpm3->setText(QString::number(info.rpm3,'f',0));
+2 -2
View File
@@ -400,13 +400,13 @@ void Parse::run()
src.B[1] = data[data_count++];
src.B[2] = data[data_count++];
src.B[3] = data[data_count++];
group.RightPressure = src.F / 5.0 * 16;
group.AirPressure = src.F / 5.0 * 16;
src.B[0] = data[data_count++];
src.B[1] = data[data_count++];
src.B[2] = data[data_count++];
src.B[3] = data[data_count++];
group.AirPressure = src.F / 5.0 * 2.5;
group.RightPressure = src.F / 5.0 * 2.5;
src.B[0] = data[data_count++];
src.B[1] = data[data_count++];
+13 -1
View File
@@ -164,6 +164,8 @@ MainWindow::MainWindow(QWidget *parent)
setAttribute(Qt::WA_TransparentForMouseEvents,true);
tts = new QTextToSpeech(this);
//config
@@ -2519,6 +2521,16 @@ void MainWindow::gear_Info(Parse::_gear info)
}
if(statusui)
{
statusui->setValue(1,0,9,QString::number(info.LeftPressure,'f',3));//左刹车压力
statusui->setValue(1,0,10,QString::number(info.RightPressure,'f',3));//右刹车压力
statusui->setValue(1,0,11,QString::number(info.AirPressure,'f',3));//起落架压力
statusui->setValue(1,0,12,QString::number(info.LeftWheel,'f',0));//左轮速
statusui->setValue(1,0,13,QString::number(info.RightWheel,'f',0));//右轮速
}
}
@@ -2660,7 +2672,7 @@ void MainWindow::SSPC_Info_state(Parse::_sspc info)
healthui->setColor(21,(info.state1.current_ch1)?(HealthUI::state::success):(HealthUI::state::inital));//燃油泵
healthui->setValue(22,(info.state2.current_ch9)?(tr("燃油切断")):(tr("燃油导通")));//燃油切断阀
healthui->setColor(22,(info.state2.current_ch9)?(HealthUI::state::success):(HealthUI::state::failure));//燃油切断阀
healthui->setColor(22,(info.state2.current_ch9)?(HealthUI::state::failure):(HealthUI::state::success));//燃油切断阀
healthui->setColor(23,(info.state1.current_ch8)?(HealthUI::state::success):(HealthUI::state::inital));//温度变送器
+1 -1
View File
@@ -33,7 +33,7 @@ TrailItem::TrailItem(internals::PointLatLng const & coord, int const & altitude,
QString coord_str = " " + QString::number(coord.Lat(), 'f', 6) + " " + QString::number(coord.Lng(), 'f', 6);
setToolTip(QString(tr("Position:") + "%1\n" + tr("Altitude:") + "%2\n" + tr("Time:") + "%3").arg(coord_str).arg(QString::number(altitude)).arg(time.toString()));
this->setZValue(4);
this->setZValue(6);
}
+1 -1
View File
@@ -35,7 +35,7 @@ TrailLineItem::TrailLineItem(internals::PointLatLng const & coord1, internals::P
pen.setWidth(2);
this->setPen(pen);
this->setZValue(4);
this->setZValue(6);
}
+3 -3
View File
@@ -99,11 +99,11 @@ void UAVItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, Q
{
if (isSelected)
{
this->setZValue(6);
this->setZValue(7);
}
else
{
this->setZValue(7);
this->setZValue(8);
}
}
@@ -307,7 +307,7 @@ void UAVItem::setEdit(bool value)
}
else
{
this->setZValue(7);
this->setZValue(8);
}
}
+1 -1
View File
@@ -16,7 +16,7 @@ WayPointButton::WayPointButton(MapGraphicItem *parent)
connect(parent, SIGNAL(childRefreshPosition()), this, SLOT(RefreshPos()));
connect(parent, SIGNAL(childSetOpacity(qreal)), this, SLOT(setOpacitySlot(qreal)));
this->setZValue(8);//在幕布上面
this->setZValue(10);//在幕布上面
myColor = QColor("#98FB98");
+1 -1
View File
@@ -29,7 +29,7 @@ WayPointSetting::WayPointSetting(MapGraphicItem *map, QColor background) : myMap
connect(map, SIGNAL(childRefreshPosition()), this, SLOT(RefreshPos()));
connect(map, SIGNAL(childSetOpacity(qreal)), this, SLOT(setOpacitySlot(qreal)));
this->setZValue(7);
this->setZValue(9);
/*
btn_load = new WayPointButton(map);