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
43381352
Commit
43381352
authored
Jun 09, 2017
by
Julien Lecoeur
Committed by
Julien Lecoeur
Sep 27, 2018
Browse files
Add support for message DEBUG_ARRAY
parent
837bbe26
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ui/MAVLinkDecoder.cc
View file @
43381352
...
...
@@ -36,6 +36,7 @@ MAVLinkDecoder::MAVLinkDecoder(MAVLinkProtocol* protocol) :
textMessageFilter
.
insert
(
MAVLINK_MSG_ID_DEBUG
,
false
);
textMessageFilter
.
insert
(
MAVLINK_MSG_ID_DEBUG_VECT
,
false
);
textMessageFilter
.
insert
(
MAVLINK_MSG_ID_DEBUG_FLOAT_ARRAY
,
false
);
textMessageFilter
.
insert
(
MAVLINK_MSG_ID_NAMED_VALUE_FLOAT
,
false
);
textMessageFilter
.
insert
(
MAVLINK_MSG_ID_NAMED_VALUE_INT
,
false
);
// textMessageFilter.insert(MAVLINK_MSG_ID_HIGHRES_IMU, false);
...
...
@@ -238,6 +239,16 @@ void MAVLinkDecoder::emitFieldValue(mavlink_message_t* msg, int fieldid, quint64
name
=
QString
(
"%1.%2"
).
arg
(
buf
).
arg
(
fieldName
);
time
=
getUnixTimeFromMs
(
msg
->
sysid
,
(
debug
.
time_usec
+
500
)
/
1000
);
// Scale to milliseconds, round up/down correctly
}
else
if
(
msgid
==
MAVLINK_MSG_ID_DEBUG_FLOAT_ARRAY
)
{
mavlink_debug_float_array_t
debug
;
mavlink_msg_debug_float_array_decode
(
msg
,
&
debug
);
char
buf
[
11
];
strncpy
(
buf
,
debug
.
name
,
10
);
buf
[
10
]
=
'\0'
;
name
=
QString
(
"%1.%2"
).
arg
(
buf
).
arg
(
fieldName
);
time
=
getUnixTimeFromMs
(
msg
->
sysid
,
(
debug
.
time_usec
+
500
)
/
1000
);
// Scale to milliseconds, round up/down correctly
}
else
if
(
msgid
==
MAVLINK_MSG_ID_DEBUG
)
{
mavlink_debug_t
debug
;
...
...
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