Skip to content

Commit 4df72a2

Browse files
committed
LP-525 Added tinyFISH GCS HW page
1 parent 657499c commit 4df72a2

6 files changed

Lines changed: 851 additions & 58 deletions

File tree

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

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>605</width>
10-
<height>208</height>
9+
<width>604</width>
10+
<height>189</height>
1111
</rect>
1212
</property>
1313
<layout class="QGridLayout" name="gridLayout_10">
@@ -67,125 +67,125 @@
6767
</property>
6868
</widget>
6969
</item>
70-
<item row="2" column="1" rowspan="5" colspan="2">
70+
<item row="2" column="4" rowspan="5" colspan="2">
7171
<layout class="QGridLayout" name="gridLayout_2">
7272
<property name="verticalSpacing">
7373
<number>-1</number>
7474
</property>
75-
<item row="3" column="0">
76-
<widget class="QLabel" name="lbGPSSpeed">
75+
<item row="4" column="1">
76+
<widget class="QComboBox" name="cbTelemetrySpeed">
77+
<property name="enabled">
78+
<bool>true</bool>
79+
</property>
80+
<property name="frame">
81+
<bool>true</bool>
82+
</property>
83+
</widget>
84+
</item>
85+
<item row="4" column="0">
86+
<widget class="QLabel" name="lbTelemetrySpeed">
7787
<property name="sizePolicy">
7888
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
7989
<horstretch>0</horstretch>
8090
<verstretch>0</verstretch>
8191
</sizepolicy>
8292
</property>
8393
<property name="text">
84-
<string>GPS Speed</string>
94+
<string>Telemetry Speed</string>
8595
</property>
8696
<property name="alignment">
8797
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
8898
</property>
8999
</widget>
90100
</item>
91-
<item row="1" column="1">
92-
<widget class="QComboBox" name="cbTelemetrySpeed">
101+
<item row="6" column="1">
102+
<widget class="QComboBox" name="cbGPSSpeed">
93103
<property name="enabled">
94104
<bool>true</bool>
95105
</property>
96-
<property name="frame">
106+
</widget>
107+
</item>
108+
<item row="8" column="0" colspan="2">
109+
<spacer name="verticalSpacer_2">
110+
<property name="orientation">
111+
<enum>Qt::Vertical</enum>
112+
</property>
113+
<property name="sizeType">
114+
<enum>QSizePolicy::MinimumExpanding</enum>
115+
</property>
116+
<property name="sizeHint" stdset="0">
117+
<size>
118+
<width>250</width>
119+
<height>1</height>
120+
</size>
121+
</property>
122+
</spacer>
123+
</item>
124+
<item row="5" column="1">
125+
<widget class="QComboBox" name="cbDebugConsoleSpeed">
126+
<property name="enabled">
97127
<bool>true</bool>
98128
</property>
99129
</widget>
100130
</item>
101-
<item row="1" column="0">
102-
<widget class="QLabel" name="lbTelemetrySpeed">
131+
<item row="5" column="0">
132+
<widget class="QLabel" name="lbDebugConsoleSpeed">
103133
<property name="sizePolicy">
104134
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
105135
<horstretch>0</horstretch>
106136
<verstretch>0</verstretch>
107137
</sizepolicy>
108138
</property>
109139
<property name="text">
110-
<string>Telemetry Speed</string>
140+
<string>DebugConsole Speed</string>
111141
</property>
112142
<property name="alignment">
113143
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
114144
</property>
115145
</widget>
116146
</item>
117-
<item row="2" column="0">
118-
<widget class="QLabel" name="lbGPSProtocol">
147+
<item row="6" column="0">
148+
<widget class="QLabel" name="lbGPSSpeed">
119149
<property name="sizePolicy">
120150
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
121151
<horstretch>0</horstretch>
122152
<verstretch>0</verstretch>
123153
</sizepolicy>
124154
</property>
125155
<property name="text">
126-
<string>GPS Protocol</string>
156+
<string>GPS Speed</string>
127157
</property>
128158
<property name="alignment">
129159
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
130160
</property>
131161
</widget>
132162
</item>
133-
<item row="2" column="1">
134-
<widget class="QComboBox" name="cbGPSProtocol">
135-
<property name="enabled">
136-
<bool>true</bool>
137-
</property>
138-
</widget>
139-
</item>
140-
<item row="4" column="0">
141-
<widget class="QLabel" name="lbDebugConsoleSpeed">
163+
<item row="7" column="0">
164+
<widget class="QLabel" name="lbGPSProtocol">
142165
<property name="sizePolicy">
143166
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
144167
<horstretch>0</horstretch>
145168
<verstretch>0</verstretch>
146169
</sizepolicy>
147170
</property>
148171
<property name="text">
149-
<string>DebugConsole Speed</string>
172+
<string>GPS Protocol</string>
150173
</property>
151174
<property name="alignment">
152175
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
153176
</property>
154177
</widget>
155178
</item>
156-
<item row="4" column="1">
157-
<widget class="QComboBox" name="cbDebugConsoleSpeed">
158-
<property name="enabled">
159-
<bool>true</bool>
160-
</property>
161-
</widget>
162-
</item>
163-
<item row="3" column="1">
164-
<widget class="QComboBox" name="cbGPSSpeed">
179+
<item row="7" column="1">
180+
<widget class="QComboBox" name="cbGPSProtocol">
165181
<property name="enabled">
166182
<bool>true</bool>
167183
</property>
168184
</widget>
169185
</item>
170-
<item row="5" column="0" colspan="2">
171-
<spacer name="verticalSpacer_2">
172-
<property name="orientation">
173-
<enum>Qt::Vertical</enum>
174-
</property>
175-
<property name="sizeType">
176-
<enum>QSizePolicy::MinimumExpanding</enum>
177-
</property>
178-
<property name="sizeHint" stdset="0">
179-
<size>
180-
<width>250</width>
181-
<height>1</height>
182-
</size>
183-
</property>
184-
</spacer>
185-
</item>
186186
</layout>
187187
</item>
188-
<item row="2" column="4" rowspan="5" colspan="2">
188+
<item row="2" column="1" rowspan="5" colspan="2">
189189
<layout class="QGridLayout" name="gridLayout_3">
190190
<property name="verticalSpacing">
191191
<number>-1</number>

ground/gcs/src/plugins/config/config.pro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ HEADERS += \
5050
dblspindelegate.h \
5151
configrevohwwidget.h \
5252
configspracingf3evohwwidget.h \
53+
configtinyfishhwwidget.h \
5354
commonhwsettingswidget.h \
5455
calibration/calibrationutils.h \
5556
calibration/wizardstate.h \
@@ -99,6 +100,7 @@ SOURCES += \
99100
dblspindelegate.cpp \
100101
configrevohwwidget.cpp \
101102
configspracingf3evohwwidget.cpp \
103+
configtinyfishhwwidget.cpp \
102104
commonhwsettingswidget.cpp \
103105
calibration/calibrationutils.cpp \
104106
calibration/wizardstate.cpp \
@@ -138,6 +140,7 @@ FORMS += \
138140
configrevohwwidget.ui \
139141
autotune.ui \
140142
configspracingf3evohwwidget.ui \
143+
configtinyfishhwwidget.ui \
141144
commonhwsettingswidget.ui \
142145
oplink.ui \
143146
configrevonanohwwidget.ui \

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

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include "configrevonanohwwidget.h"
4444
#include "configsparky2hwwidget.h"
4545
#include "configspracingf3evohwwidget.h"
46+
#include "configtinyfishhwwidget.h"
4647
#include "defaultconfigwidget.h"
4748

4849
#include <extensionsystem/pluginmanager.h>
@@ -252,24 +253,30 @@ void ConfigGadgetWidget::onAutopilotConnect()
252253
widget = new ConfigSparky2HWWidget(this);
253254
widget->bind();
254255
stackWidget->replaceTab(ConfigGadgetWidget::Hardware, widget);
255-
} else if ((board & 0xff00) == 0x1000) {
256-
// SPRacingF3
256+
} else if ((board & 0xff00) == 0x1000) { // F3 boards
257257
ConfigTaskWidget *widget;
258258
widget = new ConfigRevoWidget(this);
259259
widget->bind();
260260
stackWidget->replaceTab(ConfigGadgetWidget::Sensors, widget);
261261

262262
widget = 0;
263263

264-
if (board == 0x1001) {
264+
switch (board) {
265+
case 0x1001:
265266
// widget = new ConfigSPRacingF3HWWidget(this);
266-
} else if (board == 0x1002 || board == 0x1003) { // SpracingF3 EVO or NucleoF303RE
267+
break;
268+
case 0x1002:
269+
case 0x1003:
267270
widget = new ConfigSPRacingF3EVOHWWidget(this);
268-
} else if (board == 0x1005) {
271+
break;
272+
case 0x1005:
269273
// widget = new ConfigPikoBLXHWWidget(this);
270-
} else if (board == 0x1006) {
271-
// widget = new ConfigTinyFISHHWWidget(this);
274+
break;
275+
case 0x1006:
276+
widget = new ConfigTinyFISHHWWidget(this);
277+
break;
272278
}
279+
273280
if (widget) {
274281
widget->bind();
275282
stackWidget->replaceTab(ConfigGadgetWidget::Hardware, widget);

0 commit comments

Comments
 (0)