Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
91f2d433
Commit
91f2d433
authored
Nov 11, 2010
by
Mariano Lizarraga
Browse files
Started populating the Combobox in HIL sim with the available Links
parent
effe7af2
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/ui/slugshilsim.cc
View file @
91f2d433
#include
"slugshilsim.h"
#include
"ui_slugshilsim.h"
#include
"LinkManager.h"
SlugsHilSim
::
SlugsHilSim
(
QWidget
*
parent
)
:
QWidget
(
parent
),
ui
(
new
Ui
::
SlugsHilSim
)
{
ui
->
setupUi
(
this
);
linkAdded
();
}
SlugsHilSim
::~
SlugsHilSim
()
{
delete
ui
;
}
void
SlugsHilSim
::
linkAdded
(
void
){
ui
->
cb_mavlinkLinks
->
clear
();
QList
<
LinkInterface
*>
linkList
=
LinkManager
::
instance
()
->
getLinks
()
;
for
(
int
i
=
0
;
i
<
linkList
.
size
();
i
++
){
ui
->
cb_mavlinkLinks
->
addItem
((
linkList
.
takeFirst
())
->
getName
());
}
}
src/ui/slugshilsim.h
View file @
91f2d433
...
...
@@ -2,9 +2,11 @@
#define SLUGSHILSIM_H
#include
<QWidget>
#include
<QHostAddress>
#include
<QUdpSocket>
#include
"LinkInterface.h"
namespace
Ui
{
class
SlugsHilSim
;
}
...
...
@@ -19,6 +21,11 @@ public:
protected:
LinkInterface
*
hilLink
;
QHostAddress
*
simulinkIp
;
QUdpSocket
*
txSocket
;
QUdpSocket
*
rxSocket
;
slots:
private:
Ui
::
SlugsHilSim
*
ui
;
...
...
src/ui/slugshilsim.ui
View file @
91f2d433
...
...
@@ -53,7 +53,7 @@
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"
lineEdit_3
"
>
<widget
class=
"QLineEdit"
name=
"
ed_ipAdress
"
>
<property
name=
"minimumSize"
>
<size>
<width>
60
</width>
...
...
@@ -99,7 +99,7 @@
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"
lineEdi
t"
>
<widget
class=
"QLineEdit"
name=
"
ed_rxPor
t"
>
<property
name=
"minimumSize"
>
<size>
<width>
60
</width>
...
...
@@ -132,7 +132,7 @@
</widget>
</item>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"
lineEdit_2
"
>
<widget
class=
"QLineEdit"
name=
"
ed_TxPort
"
>
<property
name=
"minimumSize"
>
<size>
<width>
60
</width>
...
...
@@ -179,12 +179,12 @@
<enum>
Qt::RightToLeft
</enum>
</property>
<property
name=
"text"
>
<string>
Slugs HIL Sim Serial
Port
</string>
<string>
Slugs HIL Sim Serial
Link
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"c
omboBox
"
/>
<widget
class=
"QComboBox"
name=
"c
b_mavlinkLinks
"
/>
</item>
</layout>
</item>
...
...
@@ -204,7 +204,7 @@
</spacer>
</item>
<item>
<widget
class=
"QPushButton"
name=
"
pushButton
"
>
<widget
class=
"QPushButton"
name=
"
bt_startHil
"
>
<property
name=
"text"
>
<string>
Set in HIL Mode
</string>
</property>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment