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
9405b6f1
Commit
9405b6f1
authored
Feb 18, 2012
by
TobiasSimon
Browse files
fixed out-of-order bug in packet loss calculation
parent
aaf236a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/comm/MAVLinkProtocol.cc
View file @
9405b6f1
...
...
@@ -370,7 +370,8 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b)
int16_t
lostMessages
=
message
.
seq
-
expectedIndex
;
if
(
lostMessages
<
0
)
{
lostMessages
+=
256
;
// Usually, this happens in the case of an out-of order packet
lostMessages
=
0
;
}
qDebug
()
<<
QString
(
"Lost %1 messages: expected sequence ID %2 but received %3."
).
arg
(
lostMessages
).
arg
(
expectedIndex
).
arg
(
message
.
seq
);
...
...
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