显示控速差,高度差

This commit is contained in:
hm
2022-11-16 15:15:46 +08:00
parent 9ae3e3723a
commit 3975375909
3 changed files with 9 additions and 8 deletions
+2 -2
View File
@@ -245,7 +245,7 @@ void MenuBarUI::setTargetPoint(int Value)
void MenuBarUI::setTargetAlt(QVariant Value)
{
ui->label_TargteAlt->setText(Value.toString());
ui->label_TargteAlt->setText(QString::number(Value.toDouble(),'f',1));
}
void MenuBarUI::setX(float Value)
@@ -260,7 +260,7 @@ void MenuBarUI::setwp_Dist(float Value)
void MenuBarUI::setTagetAirspeed(QVariant Value)
{
ui->label_TargetAirSpeed->setText(Value.toString());
ui->label_TargetAirSpeed->setText(QString::number(Value.toDouble(),'f',1));
}
void MenuBarUI::setFlightTime(QTime Value)
+2 -2
View File
@@ -289,7 +289,7 @@
<item row="1" column="4">
<widget class="QLabel" name="label_5">
<property name="text">
<string>单位耗时</string>
<string>高度差[m]</string>
</property>
</widget>
</item>
@@ -309,7 +309,7 @@
<item row="2" column="4">
<widget class="QLabel" name="label_9">
<property name="text">
<string>INS2时间</string>
<string>速度差</string>
</property>
</widget>
</item>
+5 -4
View File
@@ -1835,8 +1835,8 @@ void MainWindow::updateVehicle(MavLinkNode::_vehicle vehicle)//事件驱动式
uint64_t time = vehicle.ins2.time * 0.001;
menuBarUI->setTargetAlt(vehicle.sys_status.load);
//menuBarUI->setTargetAlt(vehicle.sys_status.load);
menuBarUI->setTargetAlt(vehicle.nav_controller_output.alt_error);
//qDebug() << "time" << time;
uint8_t hour = time / 3600;//得出小时
@@ -1855,7 +1855,8 @@ void MainWindow::updateVehicle(MavLinkNode::_vehicle vehicle)//事件驱动式
tim_str.append(":");
tim_str.append(QString::number(sec));
menuBarUI->setTagetAirspeed(tim_str);
//menuBarUI->setTagetAirspeed(tim_str);
menuBarUI->setTagetAirspeed(vehicle.nav_controller_output.aspd_error);
menuBarUI->setX(vehicle.nav_controller_output.xtrack_error);
@@ -2006,7 +2007,7 @@ void MainWindow::updateVehicle(MavLinkNode::_vehicle vehicle)//事件驱动式
statusui->setValue(1,2,3,getBit(health,3)?("使用SBG"):("使用320"));//导航源
statusui->setValue(1,3,0,getBit(health,9)?("在安控区内"):("超出安控区"));
statusui->setValue(1,3,0,getBit(health,10)?("复飞"):("不复飞"));
statusui->setValue(1,3,1,getBit(health,10)?("复飞"):("不复飞"));
statusui->setValue(0,2,10,getBit(health,11)?("使用采集油量"):("使用模型油量"));
}