添加航点切换

This commit is contained in:
hm
2020-10-24 11:21:24 +08:00
parent 2147fc11d5
commit d5784849a2
16 changed files with 614 additions and 498 deletions
+3 -1
View File
@@ -122,13 +122,15 @@ void CommandBox::setFloat(void)
if(this->parent())
{
this->setParent(nullptr);
this->show();
}
else
{
this->setParent(m_parent);
this->move(0,0);
this->hide();
}
this->show();
}
}
+54 -5
View File
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>280</width>
<height>496</height>
<width>340</width>
<height>490</height>
</rect>
</property>
<property name="windowTitle">
@@ -26,10 +26,59 @@
<property name="bottomMargin">
<number>1</number>
</property>
<property name="spacing">
<number>1</number>
</property>
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>无人机#</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_2"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>航点#</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox"/>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>切换航点</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox_Command">
<property name="title">
<string>Command</string>
+10 -6
View File
@@ -66,19 +66,23 @@ void StatusUI::setState(uint32_t pos,QVariant real,QVariant meas)
ui->label_heading_meas->setText(meas.toString());
break;
case 4:
ui->label_yaw_real->setText(real.toString());
//ui->label_heading_meas->setText(meas.toString());
break;
case 5:
ui->label_dis_real->setText(real.toString());
ui->label_dis_meas->setText(meas.toString());
break;
case 5:
case 6:
ui->label_alt_real->setText(real.toString());
ui->label_alt_meas->setText(meas.toString());
break;
case 6:
case 7:
ui->label_as_real->setText(real.toString());
ui->label_as_meas->setText(meas.toString());
break;
break;
case 7:
case 8:
ui->label_rate_real->setText(real.toString());
ui->label_rate_meas->setText(meas.toString());
break;
@@ -90,7 +94,7 @@ void StatusUI::setDigitalAtmosphereSystem(uint32_t pos,QVariant real,QVariant me
switch (pos) {
case 1:
ui->label_atteck_real->setText(real.toString());
ui->label_atteck_meas->setText(meas.toString());
//ui->label_atteck_meas->setText(meas.toString());
break;
case 2:
ui->label_slide_real->setText(real.toString());
@@ -98,11 +102,11 @@ void StatusUI::setDigitalAtmosphereSystem(uint32_t pos,QVariant real,QVariant me
break;
case 3:
ui->label_tas_real->setText(real.toString());
ui->label_tas_meas->setText(meas.toString());
//ui->label_tas_meas->setText(meas.toString());
break;
case 4:
ui->label_Ma_real->setText(real.toString());
ui->label_Ma_meas->setText(meas.toString());
//ui->label_Ma_meas->setText(meas.toString());
break;
}
}
+424 -443
View File
@@ -348,8 +348,21 @@
<string>基本状态</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="2">
<widget class="QLabel" name="label_pitch_meas">
<item row="5" column="2">
<widget class="QLabel" name="label_dis_meas">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QLabel" name="label_rate_real">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
@@ -361,8 +374,8 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_pitch_real">
<item row="7" column="1">
<widget class="QLabel" name="label_as_real">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
@@ -374,23 +387,10 @@
</property>
</widget>
</item>
<item row="9" column="2">
<widget class="QLabel" name="label_rate_meas">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<item row="7" column="0">
<widget class="QLabel" name="label_24">
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_18">
<property name="text">
<string>侧偏距[m]</string>
<string>表速[m/s]</string>
</property>
</widget>
</item>
@@ -407,15 +407,15 @@
</property>
</widget>
</item>
<item row="9" column="0">
<item row="10" column="0">
<widget class="QLabel" name="label_33">
<property name="text">
<string>升降速率</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_heading_real">
<item row="1" column="2">
<widget class="QLabel" name="label_pitch_meas">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
@@ -428,7 +428,7 @@
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="label_as_real">
<widget class="QLabel" name="label_alt_real">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
@@ -440,43 +440,10 @@
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_9">
<item row="6" column="0">
<widget class="QLabel" name="label_21">
<property name="text">
<string>俯仰角[°]</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_roll_real">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QLabel" name="label_dis_meas">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>滚转角[°]</string>
<string>海拔[m]</string>
</property>
</widget>
</item>
@@ -487,7 +454,7 @@
</property>
</widget>
</item>
<item row="6" column="2">
<item row="7" column="2">
<widget class="QLabel" name="label_as_meas">
<property name="styleSheet">
<string notr="true"/>
@@ -500,7 +467,27 @@
</property>
</widget>
</item>
<item row="4" column="1">
<item row="5" column="0">
<widget class="QLabel" name="label_18">
<property name="text">
<string>侧偏距[m]</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_pitch_real">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_dis_real">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
@@ -513,7 +500,7 @@
</property>
</widget>
</item>
<item row="5" column="2">
<item row="6" column="2">
<widget class="QLabel" name="label_alt_meas">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
@@ -539,43 +526,10 @@
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QLabel" name="label_rate_real">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<item row="2" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_alt_real">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_21">
<property name="text">
<string>海拔[m]</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_24">
<property name="text">
<string>表速[m/s]</string>
<string>滚转角[°]</string>
</property>
</widget>
</item>
@@ -589,6 +543,26 @@
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_heading_real">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>俯仰角[°]</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_3">
<property name="text">
@@ -599,90 +573,8 @@
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox_8">
<property name="title">
<string>大气机</string>
</property>
<layout class="QGridLayout" name="gridLayout_12">
<item row="0" column="1">
<widget class="QLabel" name="label_atteck_real">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_27">
<property name="text">
<string>真空速[m/s]</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_tas_meas">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>攻角[°]</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_atteck_meas">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>侧滑角[°]</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_slide_real">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_tas_real">
<widget class="QLabel" name="label_roll_real">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
@@ -694,15 +586,8 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_30">
<property name="text">
<string>马赫数[Ma]</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_Ma_real">
<item row="10" column="2">
<widget class="QLabel" name="label_rate_meas">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
@@ -714,13 +599,20 @@
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="label_Ma_meas">
<item row="4" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
<string>航向角[°]</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_yaw_real">
<property name="styleSheet">
<string notr="true"/>
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string/>
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -921,6 +813,326 @@
</item>
<item row="1" column="1">
<layout class="QGridLayout" name="gridLayout_4">
<item row="5" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="0">
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>数据链</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="1">
<widget class="QLabel" name="label_ssr">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_ssp">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_54">
<property name="text">
<string>信号质量</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_56">
<property name="text">
<string>字节速度</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>发动机</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="1">
<widget class="QLabel" name="label_thr">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_temp1">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_58">
<property name="text">
<string>油门</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_61">
<property name="text">
<string>舱壁温度1</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_rpm">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_FuelLeft">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_60">
<property name="text">
<string>转速</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>舱壁温度2</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_temp2">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>剩余油量</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>油箱压力</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_fuelPressure">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>电池</string>
</property>
<layout class="QGridLayout" name="gridLayout_6">
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>28V剩余(%)</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>电流28V(A)</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_28V_A">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_50">
<property name="text">
<string>机载28V(V)</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_28v">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_56v">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_52">
<property name="text">
<string>机载56V(V)</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>电流56V(A)</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_56V_A">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>56V剩余(%)</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_28V_percent">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_56V_percent">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_7">
<property name="title">
@@ -1051,26 +1263,13 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox_4">
<widget class="QGroupBox" name="groupBox_8">
<property name="title">
<string>发动机</string>
<string>大气机</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="1">
<widget class="QLabel" name="label_thr">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<layout class="QGridLayout" name="gridLayout_12">
<item row="2" column="1">
<widget class="QLabel" name="label_temp1">
<widget class="QLabel" name="label_tas_real">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
@@ -1083,193 +1282,28 @@
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_58">
<widget class="QLabel" name="label_6">
<property name="text">
<string>油门</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_61">
<property name="text">
<string>舱壁温度1</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_rpm">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_FuelLeft">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_60">
<property name="text">
<string>转速</string>
<string>攻角[°]</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<widget class="QLabel" name="label_30">
<property name="text">
<string>舱壁温度2</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_temp2">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>剩余油量</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>油箱压力</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_fuelPressure">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>数据链</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="1">
<widget class="QLabel" name="label_ssr">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_ssp">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_54">
<property name="text">
<string>信号质量</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_56">
<property name="text">
<string>字节速度</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>电池</string>
</property>
<layout class="QGridLayout" name="gridLayout_6">
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>28V剩余(%)</string>
<string>马赫数[Ma]</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_13">
<widget class="QLabel" name="label_27">
<property name="text">
<string>电流28V(A)</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_28V_A">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_50">
<property name="text">
<string>机载28V(V)</string>
<string>真空速[m/s]</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_28v">
<widget class="QLabel" name="label_atteck_real">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
@@ -1281,8 +1315,8 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_56v">
<item row="3" column="1">
<widget class="QLabel" name="label_Ma_real">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
@@ -1295,54 +1329,14 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_52">
<widget class="QLabel" name="label">
<property name="text">
<string>机载56V(V)</string>
<string>侧滑角[°]</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>电流56V(A)</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_56V_A">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>56V剩余(%)</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_28V_percent">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_56V_percent">
<item row="1" column="1">
<widget class="QLabel" name="label_slide_real">
<property name="styleSheet">
<string notr="true">background-color: rgb(189, 189, 189);</string>
</property>
@@ -1357,19 +1351,6 @@
</layout>
</widget>
</item>
<item row="4" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="0" colspan="2">
+7 -1
View File
@@ -102,6 +102,11 @@ PowerSystem::PowerSystem(QWidget *parent) :
cmdList.insert(0xea,"加力点火快速阀");
ScopeRPM = new QtCharts::QChart();
ScopeTemp = new QtCharts::QChart();
ScopeAlt = new QtCharts::QChart();
ScopeMa = new QtCharts::QChart();
}
@@ -112,12 +117,13 @@ PowerSystem::~PowerSystem()
void PowerSystem::resizeEvent(QResizeEvent *event)
{
/*
/*
ScopeRPM->setGeometry(0,0,ui->frame_scope->width(),ui->frame_scope->height()/4);
ScopeTemp->setGeometry(0,ui->frame_scope->height()/4,ui->frame_scope->width(),ui->frame_scope->height()/4);
ScopeAlt->setGeometry(0,ui->frame_scope->height()/2,ui->frame_scope->width(),ui->frame_scope->height()/4);
ScopeMa->setGeometry(0,3*ui->frame_scope->height()/4,ui->frame_scope->width(),ui->frame_scope->height()/4);
*/
}
void PowerSystem::mousePressEvent(QMouseEvent *event)
+13 -2
View File
@@ -1,4 +1,4 @@
#ifndef POWERSYSTEM_H
#ifndef POWERSYSTEM_H
#define POWERSYSTEM_H
#include <QWidget>
@@ -15,7 +15,10 @@
#include "QScreen"
#include <QtGlobal>
#include "Scope.h"
//#include "Scope.h"
#include "QChart"
namespace Ui {
class PowerSystem;
@@ -68,10 +71,18 @@ private:
Ui::PowerSystem *ui;
/*
Scope *ScopeRPM = nullptr;
Scope *ScopeTemp = nullptr;
Scope *ScopeAlt = nullptr;
Scope *ScopeMa = nullptr;
*/
QtCharts::QChart *ScopeRPM = nullptr;
QtCharts::QChart *ScopeTemp = nullptr;
QtCharts::QChart *ScopeAlt = nullptr;
QtCharts::QChart *ScopeMa = nullptr;
};
+3 -1
View File
@@ -66,13 +66,15 @@ void ServoSystem::setFloat(void)
if(this->parent())
{
this->setParent(nullptr);
this->show();
}
else
{
this->setParent(m_parent);
this->move(0,0);
this->hide();
}
this->show();
//
}
void ServoSystem::setColor(QWidget *w,state s)
+3 -3
View File
@@ -1,4 +1,4 @@
#include "ToolsUI.h"
#include "ToolsUI.h"
#include "ui_ToolsUI.h"
@@ -551,10 +551,10 @@ void ToolsUI::on_pushButton_ShowExtern_clicked()
//index1->setFloat();
break;
case 2:
//index2->setFloat();
index2->setFloat();
break;
case 3:
//index3->setFloat();
index3->setFloat();
break;
case 4:
index4->setFloat();
+3 -2
View File
@@ -1,4 +1,4 @@
#include "tools_Index0.h"
#include "tools_Index0.h"
#include "ui_tools_Index0.h"
Tools_Index0::Tools_Index0(QWidget *parent) :
@@ -61,14 +61,15 @@ void Tools_Index0::setFloat(void)
{
this->setParent(nullptr);
this->resize(800,480);
this->show();
}
else
{
this->setParent(m_parent);
this->setGeometry(m_parent->geometry());
this->move(0,0);
this->hide();
}
this->show();
}
+49 -2
View File
@@ -1,4 +1,4 @@
#include "tools_Index2.h"
#include "tools_Index2.h"
#include "ui_tools_Index2.h"
Tools_Index2::Tools_Index2(QWidget *parent) :
@@ -6,7 +6,7 @@ Tools_Index2::Tools_Index2(QWidget *parent) :
ui(new Ui::Tools_Index2)
{
ui->setupUi(this);
m_parent = parent;
//load qss
QFile file(":/qss/Setting.qss");
file.open(QFile::ReadOnly);
@@ -29,6 +29,53 @@ Tools_Index2::~Tools_Index2()
delete ui;
}
void Tools_Index2::closeEvent(QCloseEvent *event)
{
setFloat();
event->ignore();
}
void Tools_Index2::contextMenuEvent(QContextMenuEvent *event)
{
QMenu *menu = new QMenu(this);
QAction *pAction = new QAction("float",this);
connect(pAction,SIGNAL(triggered(bool)),
this,SLOT(setFloat()));
menu->addAction(pAction);
menu->move(cursor().pos());
menu->show();
}
void Tools_Index2::setFloat(void)
{
if(this->parent())
{
this->setParent(nullptr);
QScreen *screen=QGuiApplication::primaryScreen ();;
this->move((screen->availableGeometry().width()-this->width())/2,(screen->availableGeometry().height()-this->height())/2);
this->show();
}
else
{
this->setParent(m_parent);
this->move(0,0);
this->hide();
//qDebug() << m_parent->children();
}
}
void Tools_Index2::on_pushButton_file_clicked()
{
QFileDialog *dlg = new QFileDialog(this);
+12 -3
View File
@@ -1,4 +1,4 @@
#ifndef TOOLS_INDEX2_H
#ifndef TOOLS_INDEX2_H
#define TOOLS_INDEX2_H
#include <QWidget>
@@ -9,6 +9,10 @@
#include "QFileDialog"
#include "QAction"
#include "QContextMenuEvent"
#include "QMenu"
#include "QScreen"
namespace Ui {
class Tools_Index2;
@@ -23,10 +27,15 @@ public:
explicit Tools_Index2(QWidget *parent = nullptr);
~Tools_Index2();
protected:
void closeEvent(QCloseEvent *event);
void resizeEvent(QResizeEvent *event);
void contextMenuEvent(QContextMenuEvent *event);
public slots:
void setFloat(void);
void setCurrentPercentage(float value);
void ReplayComplete();
@@ -60,7 +69,7 @@ signals:
private:
Ui::Tools_Index2 *ui;
QWidget *m_parent;
bool isMove = false;
bool PlayState = false;//未播放
+2 -2
View File
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>360</width>
<height>454</height>
<width>520</width>
<height>174</height>
</rect>
</property>
<property name="windowTitle">
+3 -3
View File
@@ -1,4 +1,4 @@
#include "tools_Index3.h"
#include "tools_Index3.h"
#include "ui_tools_Index3.h"
@@ -97,14 +97,14 @@ void Tools_Index3::setFloat(void)
this->setParent(nullptr);
QScreen *screen=QGuiApplication::primaryScreen ();;
this->move((screen->availableGeometry().width()-this->width())/2,(screen->availableGeometry().height()-this->height())/2);
this->show();
}
else
{
this->setParent(m_parent);
this->move(0,0);
this->hide();
}
this->show();
}
+3 -2
View File
@@ -1,4 +1,4 @@
#include "tools_Index4.h"
#include "tools_Index4.h"
#include "ui_tools_Index4.h"
tools_Index4::tools_Index4(QWidget *parent) :
@@ -67,14 +67,15 @@ void tools_Index4::setFloat(void)
if(this->parent())
{
this->setParent(nullptr);
this->show();
}
else
{
this->setParent(m_parent);
this->setGeometry(m_parent->geometry());
this->move(0,0);
this->hide();
}
this->show();
}
void tools_Index4::mouseReleaseEvent(QMouseEvent *event)
+2
View File
@@ -1084,6 +1084,8 @@ void MainWindow::updateUI()//事件驱动式更新数据
statusui->setState(3,QString::number(to360deg(dlink->mavlinknode->vehicle.global_position_int.hdg),'f',1),
QString::number(to360deg(dlink->mavlinknode->vehicle.nav_controller_output.nav_bearing),'f',1));
statusui->setState(3,QString::number(to360deg(dlink->mavlinknode->vehicle.attitude.yaw),'f',1),tr(" "));
statusui->setState(4,QString::number(dlink->mavlinknode->vehicle.nav_controller_output.xtrack_error,'f',1),tr(" "));
statusui->setState(5,QString::number(dlink->mavlinknode->vehicle.gps_raw_int.alt * 10e-4,'f',1),tr(" "));
+23 -22
View File
@@ -63,49 +63,49 @@
# 疑问
* HUD界面,侧偏距正负,高度差正负,升降速率正负
* HUD界面,侧偏距正负,高度差正负,升降速率正负
* combox设置要判断是否有数
* combox设置要判断是否有数
*
* 界面上
* 界面上
1. 再飞行界面显示增加 空速管加热,发动机停车,工具界面,增加电池剩余百分比
1. 再飞行界面显示增加 空速管加热,发动机停车,工具界面,增加电池剩余百分比
2. 日志显示所有操作
伺服,状态下是不对
伺服,状态下是不对
舵机发送地面自检延时过大
舵机发送地面自检延时过大
航点显示经纬度,指令点不需要显示
去除真实高度显示
航点显示经纬度,指令点不需要显示
去除真实高度显示
状态框跟随飞行,显示速度和高度经纬度
多条航线
舵面标定和检查
惯导极性
×多条航线
×舵面标定和检查
惯导极性
惯导和gps相关参数
惯导和gps相关参数
惯导选择,盖子不改颜色
加航向角
惯导选择,盖子不改颜色
加航向角
航线界面,导入时,航点不对,保存和导入不对,下载不对,上传
航线界面,导入时,航点不对,保存和导入不对,下载不对,上传
界面加一个舵机指令
舵机显示 int16
界面加一个舵机指令
√舵机显示 int16
指令界面加一个航点切换的下拉框
√指令按键需要自己实现一下,去掉键盘响应功能
@@ -119,13 +119,14 @@
自动连接
遥控器
无人机图片上显示无人机编号
√ 马赫数2位小数
表速
真空苏
地速
马赫数
表速
真空苏
地速
马赫数
现在抬头显示器空速显示小于3ma,需要增加到9999米每秒