Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HighBlueParsers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Paul Best
HighBlueParsers
Commits
537b9526
Commit
537b9526
authored
8 months ago
by
Philémon Prévot
Browse files
Options
Downloads
Patches
Plain Diff
Correct sample and imu_data confusion
parent
9601e043
No related branches found
No related tags found
1 merge request
!2
HighBlueParser dev branch merged to empty main branch
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/filewriter.cpp
+4
-4
4 additions, 4 deletions
src/filewriter.cpp
src/recorder.cpp
+1
-0
1 addition, 0 deletions
src/recorder.cpp
with
5 additions
and
4 deletions
src/filewriter.cpp
+
4
−
4
View file @
537b9526
...
@@ -456,15 +456,15 @@ void IMUFileWriter::ProcessDecodedMessage(int msgFunction, int msgPayloadLength,
...
@@ -456,15 +456,15 @@ void IMUFileWriter::ProcessDecodedMessage(int msgFunction, int msgPayloadLength,
void
IMUFileWriter
::
write
(
uint8_t
*
sample
,
size_t
size
,
uint8_t
*
imu_data
)
{
void
IMUFileWriter
::
write
(
uint8_t
*
sample
,
size_t
size
,
uint8_t
*
imu_data
)
{
uint8_t
*
imu_data_cur
(
imu_data
);
uint8_t
*
imu_data_cur
(
imu_data
);
uint8_t
softwareMajorRev
=
sample
[
0
];
uint8_t
softwareMajorRev
=
imu_data
[
0
];
uint8_t
softwareMinorRev
=
sample
[
6
];
uint8_t
softwareMinorRev
=
imu_data
[
6
];
std
::
cerr
<<
"sMR"
<<
static_cast
<
int
>
(
sample
[
0
])
<<
std
::
endl
;
std
::
cerr
<<
"sMR"
<<
static_cast
<
int
>
(
imu_data
[
0
])
<<
std
::
endl
;
std
::
cerr
<<
"Size : "
<<
size
<<
std
::
endl
;
std
::
cerr
<<
"Size : "
<<
size
<<
std
::
endl
;
if
(
softwareMajorRev
>
2
)
{
if
(
softwareMajorRev
>
2
)
{
for
(
int
i
=
1
;
i
<
size
-
enteteSize
;
i
++
)
for
(
int
i
=
1
;
i
<
size
-
enteteSize
;
i
++
)
{
{
DecodeMessage
(
sample
[
i
]);
DecodeMessage
(
imu_data
[
i
]);
}
}
}
}
else
{
else
{
...
...
This diff is collapsed.
Click to expand it.
src/recorder.cpp
+
1
−
0
View file @
537b9526
...
@@ -178,6 +178,7 @@ void JasonRecorder::get_samples(std::vector<std::uint8_t> &samples, std::vector<
...
@@ -178,6 +178,7 @@ void JasonRecorder::get_samples(std::vector<std::uint8_t> &samples, std::vector<
size_t
start
=
this
->
additional_data_size
+
6
;
size_t
start
=
this
->
additional_data_size
+
6
;
imu_data
.
resize
(
0
);
imu_data
.
resize
(
0
);
imu_data
.
reserve
(
this
->
additional_data_size
);
imu_data
.
reserve
(
this
->
additional_data_size
);
std
::
cerr
<<
"softMajorRev : "
<<
std
::
dec
<<
&
buffer
[
4
]
<<
std
::
endl
;
imu_data
.
insert
(
imu_data
.
begin
(),
&
buffer
[
6
],
&
buffer
[
start
]);
imu_data
.
insert
(
imu_data
.
begin
(),
&
buffer
[
6
],
&
buffer
[
start
]);
size_t
num_samples
=
(
received
-
start
);
size_t
num_samples
=
(
received
-
start
);
num_samples
=
(
num_samples
/
(
num_channels
*
this
->
depth
))
*
num_channels
*
this
->
depth
;
num_samples
=
(
num_samples
/
(
num_channels
*
this
->
depth
))
*
num_channels
*
this
->
depth
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment