解开控制台显示

This commit is contained in:
hm
2020-10-27 18:56:30 +08:00
parent d156ad663e
commit 4b6269be9d
6 changed files with 621 additions and 598 deletions
+2 -2
View File
@@ -329,13 +329,13 @@ void Chart::chartUpdate(void)
float minValue = yMin.at(0);
foreach (float min, yMin) {
if(minValue < min)
if(minValue > min)
{
minValue = min;
}
}
chart()->axisY()->setRange(minValue - qAbs(minValue - 1) * 0.1 ,maxValue + qAbs(maxValue + 1) * 0.1);
chart()->axisY()->setRange(minValue - qAbs(minValue - 1) * 0.2 ,maxValue + qAbs(maxValue + 1) * 0.2);
update();
}
}
+6 -5
View File
@@ -106,16 +106,17 @@ PowerSystem::PowerSystem(QWidget *parent) :
ScopeTemp = new Chart(ui->frame_Temp);
ScopeAlt = new Chart(ui->frame_Alt);
ScopeMa = new Chart(ui->frame_Ma);
/*
ScopeRPM->chart()->axisX()->hide();
ScopeTemp->chart()->axisX()->hide();
ScopeAlt->chart()->axisX()->hide();
ScopeMa->chart()->axisX()->hide();
*/
ScopeRPM->chart()->legend()->setAlignment(Qt::AlignLeft);
ScopeTemp->chart()->legend()->setAlignment(Qt::AlignLeft);
ScopeAlt->chart()->legend()->setAlignment(Qt::AlignLeft);
ScopeMa->chart()->legend()->setAlignment(Qt::AlignLeft);
ScopeRPM->chart()->legend()->setAlignment(Qt::AlignRight);
ScopeTemp->chart()->legend()->setAlignment(Qt::AlignRight);
ScopeAlt->chart()->legend()->setAlignment(Qt::AlignRight);
ScopeMa->chart()->legend()->setAlignment(Qt::AlignRight);
ScopeRPM->setOperation(false);
+594 -582
View File
@@ -14,65 +14,18 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="1" rowspan="3">
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>状态</string>
<item row="3" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="1" column="0">
<widget class="QCheckBox" name="checkBox_28v">
<property name="text">
<string>28V电源</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="checkBox_onBoard">
<property name="text">
<string>机载电源</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="checkBox_500W">
<property name="text">
<string>500W大功率打开</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="checkBox_56v">
<property name="text">
<string>56V电源</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="checkBox_AirSpeed">
<property name="text">
<string>空速管加热</string>
</property>
</widget>
</item>
<item row="6" column="0">
<spacer name="verticalSpacer_2">
<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>
</widget>
</spacer>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_2">
@@ -95,155 +48,7 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item row="2" column="1">
<widget class="QGroupBox" name="groupBox_8">
<property name="title">
<string>右副翼</string>
</property>
<layout class="QGridLayout" name="gridLayout_8">
<item row="0" column="0">
<widget class="QLabel" name="label_27">
<property name="text">
<string>指令位</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_ail_r_cmd">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_RA_SBIT">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>上电自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_30">
<property name="text">
<string>当前位</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_ail_r_curr">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_RA_ZERO">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>找零</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_RA_GBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>地面自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>左升降</string>
@@ -391,303 +196,7 @@
</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_7">
<item row="1" column="1">
<widget class="QLabel" name="label_ail_l_curr">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</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_20">
<property name="text">
<string>指令位</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_LA_GBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>地面自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_23">
<property name="text">
<string>当前位</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_LA_ZERO">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>找零</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_ail_l_cmd">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_LA_SBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>上电自检</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_4">
<property name="title">
<string>方向舵</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="2" column="2">
<widget class="QLabel" name="label_RU_GBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>地面自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_RU_ZERO">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>找零</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>指令位</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>当前位</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_rud_cmd">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</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_rud_curr">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_RU_SBIT">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>上电自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="1">
<item row="2" column="1">
<widget class="QGroupBox" name="groupBox_7">
<property name="title">
<string>右升降</string>
@@ -835,22 +344,453 @@
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>左副翼</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="1" column="1">
<widget class="QLabel" name="label_ail_l_curr">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</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_20">
<property name="text">
<string>指令位</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_LA_GBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>地面自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_23">
<property name="text">
<string>当前位</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_LA_ZERO">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>找零</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_ail_l_cmd">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_LA_SBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>上电自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<widget class="QGroupBox" name="groupBox_8">
<property name="title">
<string>右副翼</string>
</property>
<layout class="QGridLayout" name="gridLayout_8">
<item row="0" column="0">
<widget class="QLabel" name="label_27">
<property name="text">
<string>指令位</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_ail_r_cmd">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_RA_SBIT">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>上电自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_30">
<property name="text">
<string>当前位</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_ail_r_curr">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_RA_ZERO">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>找零</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_RA_GBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>地面自检</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_4">
<property name="title">
<string>方向舵</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="2" column="2">
<widget class="QLabel" name="label_RU_GBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>地面自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_RU_ZERO">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>找零</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>指令位</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>当前位</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_rud_cmd">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</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_rud_curr">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_RU_SBIT">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>上电自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" 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="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
@@ -860,19 +800,6 @@
<set>Qt::AlignCenter</set>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="3">
<widget class="QLabel" name="label_onBoard_28V_Current">
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</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">
<property name="text">
@@ -880,31 +807,37 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>机载56V电压(V</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="label_11">
<property name="text">
<string>机载56V电流(A</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_onBoard_56V_Voltage">
<item row="5" column="3">
<widget class="QLabel" name="label_56V_percent">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</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_8">
<property name="text">
<string>机载28V电压(V</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_28V_percent">
<property name="minimumSize">
<size>
<width>16777215</width>
<width>0</width>
<height>30</height>
</size>
</property>
@@ -919,16 +852,10 @@
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QLabel" name="label_onBoard_56V_Current">
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<item row="5" column="2">
<widget class="QLabel" name="label_5">
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
<string>56V剩余(%</string>
</property>
</widget>
</item>
@@ -957,27 +884,6 @@
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_7">
<property name="text">
<string>机载28V电流(A</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>机载28V电压(V</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>28V剩余(%</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_temp">
<property name="minimumSize">
@@ -1003,8 +909,22 @@
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>28V剩余(%</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>机载28V电流(A</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_28V_percent">
<widget class="QLabel" name="label_onBoard_28V_Current">
<property name="minimumSize">
<size>
<width>0</width>
@@ -1022,15 +942,47 @@
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QLabel" name="label_5">
<item row="1" column="3">
<widget class="QLabel" name="label_onBoard_56V_Voltage">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>30</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>56V剩余(%</string>
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_12">
<property name="text">
<string>机载56V电压(V</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QLabel" name="label_11">
<property name="text">
<string>机载56V电流(A</string>
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="QLabel" name="label_56V_percent">
<widget class="QLabel" name="label_onBoard_56V_Current">
<property name="minimumSize">
<size>
<width>0</width>
@@ -1051,6 +1003,66 @@
</layout>
</widget>
</item>
<item row="0" column="1" rowspan="3">
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>状态</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="1" column="0">
<widget class="QCheckBox" name="checkBox_28v">
<property name="text">
<string>28V电源</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="checkBox_onBoard">
<property name="text">
<string>机载电源</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="checkBox_500W">
<property name="text">
<string>500W大功率打开</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="checkBox_56v">
<property name="text">
<string>56V电源</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="checkBox_AirSpeed">
<property name="text">
<string>空速管加热</string>
</property>
</widget>
</item>
<item row="6" column="0">
<spacer name="verticalSpacer_2">
<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>
</widget>
</item>
</layout>
</widget>
<resources/>
+3 -4
View File
@@ -11,7 +11,7 @@ void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QS
QString msgstr;
switch (type) {
case QtDebugMsg:
msgstr = QString::asprintf(">> Debug: %s \r\n", qPrintable(msg));
msgstr = QString::asprintf("<font color=\"#FF0000\">>></font> Debug: %s \r\n", qPrintable(msg));
break;
case QtInfoMsg:
msgstr = QString::asprintf(">> Info: %s \r\n", qPrintable(msg));
@@ -33,7 +33,6 @@ void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QS
cursor = log_te->textCursor();
cursor.movePosition(QTextCursor::End);
log_te->setTextCursor(cursor);
}
@@ -53,9 +52,9 @@ Tools_Index3::Tools_Index3(QWidget *parent) :
this->setStyleSheet(stylesheet);
file.close();
//log_te = ui->plainTextEdit;
log_te = ui->plainTextEdit;
//qInstallMessageHandler(myMessageOutput);
qInstallMessageHandler(myMessageOutput);
}
Tools_Index3::~Tools_Index3()
+3 -3
View File
@@ -1202,8 +1202,8 @@ void MainWindow::updateUI()//事件驱动式更新数据
statusui->setEngine(2,QString::number(dlink->mavlinknode->vehicle.turbinstate.RPM_mea,'f',1));
statusui->setEngine(3,QString::number(dlink->mavlinknode->vehicle.ccmstate.temp[0] * 0.1,'f',1));
statusui->setEngine(4,QString::number(dlink->mavlinknode->vehicle.ccmstate.temp[1] * 0.1,'f',1));
statusui->setEngine(5,QString::number(dlink->mavlinknode->vehicle.ccmstate.fuel_level,'f',1));
statusui->setEngine(6,QString::number(dlink->mavlinknode->vehicle.ccmstate.fuel_level,'f',1));
statusui->setEngine(5,QString::number(dlink->mavlinknode->vehicle.ccmstate.temp[3],'f',1));//剩余油量
statusui->setEngine(6,QString::number(dlink->mavlinknode->vehicle.ccmstate.temp[2],'f',0));//油压
statusui->setBattery(1,QString::number(dlink->mavlinknode->vehicle.bmustate.BAT1_group_voltage_mv * 0.001,'f',1));
@@ -1295,7 +1295,7 @@ void MainWindow::updateUI()//事件驱动式更新数据
toolsui->diagram->setEngine(3,QString::number(dlink->mavlinknode->vehicle.ccmstate.temp[0] * 0.1,'f',1));
toolsui->diagram->setEngine(4,QString::number(dlink->mavlinknode->vehicle.ccmstate.temp[1] * 0.1,'f',1));
toolsui->diagram->setEngine(5,QString::number(dlink->mavlinknode->vehicle.ccmstate.fuel_level,'f',1));
toolsui->diagram->setEngine(6,QString::number(dlink->mavlinknode->vehicle.ccmstate.fuel_level,'f',1));
toolsui->diagram->setEngine(6,QString::number(dlink->mavlinknode->vehicle.ccmstate.temp[2],'f',0));
toolsui->diagram->setBattery(1,QString::number(dlink->mavlinknode->vehicle.bmustate.BAT1_group_voltage_mv * 0.001,'f',1));
+13 -2
View File
@@ -138,7 +138,7 @@
scope 清除之后没有从零开始
scope 清除之后没有从零开始
√纵轴自适应,底层根据当前框内最小值修改,最大值根据框内最大值修改
@@ -154,7 +154,7 @@ scope 清除之后没有从零开始
(飞控)惯导极性需要检查
√电池显示顺序
√舵面需要单独归零,设置时保持以前的舵面不动
航迹角数据来源确认
航迹角数据来源确认
√状态界面复制到曲线图上
√海拔显示百位出现10,不允许大于9
@@ -169,3 +169,14 @@ scope 清除之后没有从零开始
√仪表盘有Nan 要去除
惯导:
内部惯导,滚转俯仰位置不对,角速度不对
SBG,需要设置坐标轴,坐标系存在问题
√油压,剩余油量
√曲线自适应,最小值无法自适应
数据首次输入需要跳转到当前界面