Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
b2a051df
Commit
b2a051df
authored
Sep 06, 2012
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added clear button to MSG inspector
parent
748c3ef2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
14 deletions
+31
-14
QGCMAVLinkInspector.cc
src/ui/QGCMAVLinkInspector.cc
+9
-2
QGCMAVLinkInspector.h
src/ui/QGCMAVLinkInspector.h
+3
-0
QGCMAVLinkInspector.ui
src/ui/QGCMAVLinkInspector.ui
+19
-12
No files found.
src/ui/QGCMAVLinkInspector.cc
View file @
b2a051df
...
...
@@ -19,8 +19,8 @@ QGCMAVLinkInspector::QGCMAVLinkInspector(MAVLinkProtocol* protocol, QWidget *par
ui
->
setupUi
(
this
);
/* Insert system */
ui
->
systemComboBox
->
addItem
(
tr
(
"All
Systems
"
),
0
);
ui
->
componentComboBox
->
addItem
(
tr
(
"All
Components
"
),
0
);
ui
->
systemComboBox
->
addItem
(
tr
(
"All"
),
0
);
ui
->
componentComboBox
->
addItem
(
tr
(
"All"
),
0
);
mavlink_message_info_t
msg
[
256
]
=
MAVLINK_MESSAGE_INFO
;
memcpy
(
messageInfo
,
msg
,
sizeof
(
mavlink_message_info_t
)
*
256
);
...
...
@@ -38,6 +38,7 @@ QGCMAVLinkInspector::QGCMAVLinkInspector(MAVLinkProtocol* protocol, QWidget *par
// ARM UI
connect
(
ui
->
systemComboBox
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
selectDropDownMenuSystem
(
int
)));
connect
(
ui
->
componentComboBox
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
selectDropDownMenuComponent
(
int
)));
connect
(
ui
->
clearButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
clearView
()));
// ARM external connections
connect
(
UASManager
::
instance
(),
SIGNAL
(
UASCreated
(
UASInterface
*
)),
this
,
SLOT
(
addSystem
(
UASInterface
*
)));
...
...
@@ -89,6 +90,12 @@ void QGCMAVLinkInspector::addComponent(int uas, int component, const QString& na
rebuildComponentList
();
}
void
QGCMAVLinkInspector
::
clearView
()
{
treeWidgetItems
.
clear
();
ui
->
treeWidget
->
clear
();
}
void
QGCMAVLinkInspector
::
refreshView
()
{
for
(
int
i
=
0
;
i
<
256
;
++
i
)
//mavlink_message_t msg, receivedMessages)
...
...
src/ui/QGCMAVLinkInspector.h
View file @
b2a051df
...
...
@@ -24,6 +24,9 @@ public:
public
slots
:
void
receiveMessage
(
LinkInterface
*
link
,
mavlink_message_t
message
);
/** @brief Clear all messages */
void
clearView
();
/** Update view */
void
refreshView
();
void
addSystem
(
UASInterface
*
uas
);
void
addComponent
(
int
uas
,
int
component
,
const
QString
&
name
);
...
...
src/ui/QGCMAVLinkInspector.ui
View file @
b2a051df
...
...
@@ -13,19 +13,10 @@
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
columnstretch=
"2,8"
>
<layout
class=
"QGridLayout"
name=
"gridLayout"
columnstretch=
"2,8
,0,0,0
"
>
<property
name=
"margin"
>
<number>
6
</number>
</property>
<item
row=
"2"
column=
"0"
colspan=
"2"
>
<widget
class=
"QTreeWidget"
name=
"treeWidget"
>
<column>
<property
name=
"text"
>
<string
notr=
"true"
>
1
</string>
</property>
</column>
</widget>
</item>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"text"
>
...
...
@@ -36,16 +27,32 @@
<item
row=
"0"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"systemComboBox"
/>
</item>
<item
row=
"
1"
column=
"1
"
>
<item
row=
"
0"
column=
"3
"
>
<widget
class=
"QComboBox"
name=
"componentComboBox"
/>
</item>
<item
row=
"
1"
column=
"0
"
>
<item
row=
"
0"
column=
"2
"
>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"text"
>
<string>
Component
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"4"
>
<widget
class=
"QPushButton"
name=
"clearButton"
>
<property
name=
"text"
>
<string>
Clear
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
colspan=
"5"
>
<widget
class=
"QTreeWidget"
name=
"treeWidget"
>
<column>
<property
name=
"text"
>
<string
notr=
"true"
>
1
</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
<resources/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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