Skip to content

Commit 3bb2bd0

Browse files
committed
LP-399 Add groupbox for module Status
1 parent 1b25dcc commit 3bb2bd0

2 files changed

Lines changed: 129 additions & 108 deletions

File tree

ground/gcs/src/plugins/config/autotune.ui

Lines changed: 128 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
</rect>
6767
</property>
6868
<layout class="QGridLayout" name="gridLayout">
69-
<item row="10" column="0">
69+
<item row="11" column="0">
7070
<spacer name="verticalSpacer">
7171
<property name="orientation">
7272
<enum>Qt::Vertical</enum>
@@ -82,7 +82,7 @@
8282
</property>
8383
</spacer>
8484
</item>
85-
<item row="8" column="0">
85+
<item row="9" column="0">
8686
<widget class="QGroupBox" name="statusGroupBox">
8787
<property name="minimumSize">
8888
<size>
@@ -965,110 +965,7 @@
965965
</layout>
966966
</widget>
967967
</item>
968-
<item row="0" column="0" rowspan="2">
969-
<widget class="QGroupBox" name="groupBox_2">
970-
<property name="sizePolicy">
971-
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
972-
<horstretch>0</horstretch>
973-
<verstretch>0</verstretch>
974-
</sizepolicy>
975-
</property>
976-
<property name="title">
977-
<string>Module Control</string>
978-
</property>
979-
<layout class="QHBoxLayout" name="horizontalLayout_2">
980-
<item>
981-
<layout class="QVBoxLayout" name="verticalLayout">
982-
<property name="spacing">
983-
<number>0</number>
984-
</property>
985-
<property name="sizeConstraint">
986-
<enum>QLayout::SetDefaultConstraint</enum>
987-
</property>
988-
<property name="topMargin">
989-
<number>0</number>
990-
</property>
991-
<item>
992-
<widget class="QCheckBox" name="AutotuneEnable">
993-
<property name="maximumSize">
994-
<size>
995-
<width>900</width>
996-
<height>16777215</height>
997-
</size>
998-
</property>
999-
<property name="focusPolicy">
1000-
<enum>Qt::StrongFocus</enum>
1001-
</property>
1002-
<property name="toolTip">
1003-
<string>Allow AutoTune module to be started all time, without any AutoTune set in one FlightMode.</string>
1004-
</property>
1005-
<property name="text">
1006-
<string>Enable AutoTune module</string>
1007-
</property>
1008-
</widget>
1009-
</item>
1010-
<item>
1011-
<widget class="QLabel" name="label_7">
1012-
<property name="sizePolicy">
1013-
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
1014-
<horstretch>0</horstretch>
1015-
<verstretch>0</verstretch>
1016-
</sizepolicy>
1017-
</property>
1018-
<property name="text">
1019-
<string>After enabling the module, you must power cycle before using and configuring.</string>
1020-
</property>
1021-
<property name="wordWrap">
1022-
<bool>true</bool>
1023-
</property>
1024-
</widget>
1025-
</item>
1026-
</layout>
1027-
</item>
1028-
<item>
1029-
<widget class="QLabel" name="autotuneModuleStatus">
1030-
<property name="enabled">
1031-
<bool>true</bool>
1032-
</property>
1033-
<property name="sizePolicy">
1034-
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
1035-
<horstretch>0</horstretch>
1036-
<verstretch>0</verstretch>
1037-
</sizepolicy>
1038-
</property>
1039-
<property name="minimumSize">
1040-
<size>
1041-
<width>200</width>
1042-
<height>30</height>
1043-
</size>
1044-
</property>
1045-
<property name="maximumSize">
1046-
<size>
1047-
<width>200</width>
1048-
<height>200</height>
1049-
</size>
1050-
</property>
1051-
<property name="toolTip">
1052-
<string/>
1053-
</property>
1054-
<property name="styleSheet">
1055-
<string notr="true">border: 1px solid grey;
1056-
border-radius: 5;
1057-
margin:1px;
1058-
font:bold;</string>
1059-
</property>
1060-
<property name="text">
1061-
<string>Stopped</string>
1062-
</property>
1063-
<property name="alignment">
1064-
<set>Qt::AlignCenter</set>
1065-
</property>
1066-
</widget>
1067-
</item>
1068-
</layout>
1069-
</widget>
1070-
</item>
1071-
<item row="6" column="0">
968+
<item row="7" column="0">
1072969
<widget class="QGroupBox" name="configurationGroupBox">
1073970
<property name="enabled">
1074971
<bool>true</bool>
@@ -1649,7 +1546,7 @@ font:bold;</string>
16491546
</layout>
16501547
</widget>
16511548
</item>
1652-
<item row="7" column="0">
1549+
<item row="8" column="0">
16531550
<widget class="QGroupBox" name="statusGroupBox_2">
16541551
<property name="sizePolicy">
16551552
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
@@ -2090,6 +1987,130 @@ font:bold;</string>
20901987
</layout>
20911988
</widget>
20921989
</item>
1990+
<item row="0" column="0">
1991+
<layout class="QHBoxLayout" name="horizontalLayout_4">
1992+
<property name="spacing">
1993+
<number>6</number>
1994+
</property>
1995+
<property name="topMargin">
1996+
<number>0</number>
1997+
</property>
1998+
<item>
1999+
<widget class="QGroupBox" name="groupBox_2">
2000+
<property name="sizePolicy">
2001+
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
2002+
<horstretch>0</horstretch>
2003+
<verstretch>0</verstretch>
2004+
</sizepolicy>
2005+
</property>
2006+
<property name="title">
2007+
<string>Module Control</string>
2008+
</property>
2009+
<layout class="QVBoxLayout" name="verticalLayout">
2010+
<property name="spacing">
2011+
<number>0</number>
2012+
</property>
2013+
<property name="topMargin">
2014+
<number>9</number>
2015+
</property>
2016+
<item>
2017+
<widget class="QCheckBox" name="AutotuneEnable">
2018+
<property name="maximumSize">
2019+
<size>
2020+
<width>900</width>
2021+
<height>16777215</height>
2022+
</size>
2023+
</property>
2024+
<property name="focusPolicy">
2025+
<enum>Qt::StrongFocus</enum>
2026+
</property>
2027+
<property name="toolTip">
2028+
<string>Allow AutoTune module to be started all time, without any AutoTune set in one FlightMode.</string>
2029+
</property>
2030+
<property name="text">
2031+
<string>Enable AutoTune module</string>
2032+
</property>
2033+
</widget>
2034+
</item>
2035+
<item>
2036+
<widget class="QLabel" name="label_7">
2037+
<property name="sizePolicy">
2038+
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
2039+
<horstretch>0</horstretch>
2040+
<verstretch>0</verstretch>
2041+
</sizepolicy>
2042+
</property>
2043+
<property name="text">
2044+
<string>After enabling the module, you must power cycle before using and configuring.</string>
2045+
</property>
2046+
<property name="wordWrap">
2047+
<bool>true</bool>
2048+
</property>
2049+
</widget>
2050+
</item>
2051+
</layout>
2052+
</widget>
2053+
</item>
2054+
<item>
2055+
<widget class="QGroupBox" name="groupBox">
2056+
<property name="sizePolicy">
2057+
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
2058+
<horstretch>0</horstretch>
2059+
<verstretch>0</verstretch>
2060+
</sizepolicy>
2061+
</property>
2062+
<property name="title">
2063+
<string>Module Status</string>
2064+
</property>
2065+
<layout class="QHBoxLayout" name="horizontalLayout_2">
2066+
<property name="topMargin">
2067+
<number>9</number>
2068+
</property>
2069+
<item>
2070+
<widget class="QLabel" name="autotuneModuleStatus">
2071+
<property name="enabled">
2072+
<bool>true</bool>
2073+
</property>
2074+
<property name="sizePolicy">
2075+
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
2076+
<horstretch>0</horstretch>
2077+
<verstretch>0</verstretch>
2078+
</sizepolicy>
2079+
</property>
2080+
<property name="minimumSize">
2081+
<size>
2082+
<width>200</width>
2083+
<height>30</height>
2084+
</size>
2085+
</property>
2086+
<property name="maximumSize">
2087+
<size>
2088+
<width>200</width>
2089+
<height>200</height>
2090+
</size>
2091+
</property>
2092+
<property name="toolTip">
2093+
<string/>
2094+
</property>
2095+
<property name="styleSheet">
2096+
<string notr="true">border: 1px solid grey;
2097+
border-radius: 5;
2098+
margin:1px;
2099+
font:bold;</string>
2100+
</property>
2101+
<property name="text">
2102+
<string>Stopped</string>
2103+
</property>
2104+
<property name="alignment">
2105+
<set>Qt::AlignCenter</set>
2106+
</property>
2107+
</widget>
2108+
</item>
2109+
</layout>
2110+
</widget>
2111+
</item>
2112+
</layout>
2113+
</item>
20932114
</layout>
20942115
</widget>
20952116
</widget>

ground/gcs/src/plugins/config/configautotunewidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void ConfigAutoTuneWidget::refreshWidgetsValuesImpl(UAVObject *obj)
8080
TaskInfo *taskInfo = TaskInfo::GetInstance(getObjectManager());
8181

8282
bool moduleEnabled = (hwSettings->getOptionalModules(HwSettings::OPTIONALMODULES_AUTOTUNE) == HwSettings::OPTIONALMODULES_ENABLED);
83-
bool moduleRunning = (taskInfo->runningAutoTune() == true);
83+
bool moduleRunning = (taskInfo->runningAutoTune() == TaskInfo_Running::True);
8484

8585
if (obj == systemIdentStateObj) {
8686
m_autotune->stateComplete->setText((systemIdentStateObj->getComplete() == SystemIdentState::COMPLETE_TRUE) ? tr("True") : tr("False"));

0 commit comments

Comments
 (0)