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
c071e3d8
Commit
c071e3d8
authored
Apr 09, 2017
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly set fragment information
parent
6e63553b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
RTCMMavlink.cc
src/GPS/RTCM/RTCMMavlink.cc
+11
-2
No files found.
src/GPS/RTCM/RTCMMavlink.cc
View file @
c071e3d8
...
...
@@ -41,16 +41,25 @@ void RTCMMavlink::RTCMDataUpdate(QByteArray message)
memcpy
(
&
mavlinkRtcmData
.
data
,
message
.
data
(),
message
.
size
());
sendMessageToVehicle
(
mavlinkRtcmData
);
}
else
{
//we need to fragment
// We need to fragment
static
uint8_t
sequenceId
=
0
;
// Sequence id is used to indicate that the individual fragements belong to the same set
uint8_t
fragmentId
=
0
;
// Fragment id indicates the fragement within a set
int
start
=
0
;
while
(
start
<
message
.
size
())
{
int
length
=
std
::
min
(
message
.
size
()
-
start
,
maxMessageLength
);
mavlinkRtcmData
.
flags
=
1
;
//fragmented
mavlinkRtcmData
.
flags
=
1
;
// LSB set indicates messsage is fragmented
mavlinkRtcmData
.
flags
|=
fragmentId
++
<<
1
;
// Next 2 bits are fragment id
mavlinkRtcmData
.
flags
|=
sequenceId
++
<<
3
;
// Next 5 bits are sequence id
mavlinkRtcmData
.
len
=
length
;
memcpy
(
&
mavlinkRtcmData
.
data
,
message
.
data
()
+
start
,
length
);
sendMessageToVehicle
(
mavlinkRtcmData
);
start
+=
length
;
}
if
(
sequenceId
==
0x1F
)
{
sequenceId
=
0
;
}
}
}
...
...
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