Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
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
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
0a33ef4e
Commit
0a33ef4e
authored
10 years ago
by
Lorenz Meier
Browse files
Options
Downloads
Plain Diff
Merge pull request #1982 from DonLakeFlyer/MagCal
Report alternate side done for mag cal
parents
2dec10b8
bb6b30f5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/commander/mag_calibration.cpp
+9
-6
9 additions, 6 deletions
src/modules/commander/mag_calibration.cpp
with
9 additions
and
6 deletions
src/modules/commander/mag_calibration.cpp
+
9
−
6
View file @
0a33ef4e
...
...
@@ -239,29 +239,32 @@ int mag_calibration_worker(detect_orientation_return orientation, void* data)
// Mark the opposite side as collected as well. No need to collect opposite side since it
// would generate similar points.
detect_orientation_return
alternateOrientation
=
orientation
;
switch
(
orientation
)
{
case
DETECT_ORIENTATION_TAIL_DOWN
:
worker_data
->
side_data_collected
[
DETECT_ORIENTATION_NOSE_DOWN
]
=
true
;
alternateOrientation
=
DETECT_ORIENTATION_NOSE_DOWN
;
break
;
case
DETECT_ORIENTATION_NOSE_DOWN
:
worker_data
->
side_data_collected
[
DETECT_ORIENTATION_TAIL_DOWN
]
=
true
;
alternateOrientation
=
DETECT_ORIENTATION_TAIL_DOWN
;
break
;
case
DETECT_ORIENTATION_LEFT
:
worker_data
->
side_data_collected
[
DETECT_ORIENTATION_RIGHT
]
=
true
;
alternateOrientation
=
DETECT_ORIENTATION_RIGHT
;
break
;
case
DETECT_ORIENTATION_RIGHT
:
worker_data
->
side_data_collected
[
DETECT_ORIENTATION_LEFT
]
=
true
;
alternateOrientation
=
DETECT_ORIENTATION_LEFT
;
break
;
case
DETECT_ORIENTATION_UPSIDE_DOWN
:
worker_data
->
side_data_collected
[
DETECT_ORIENTATION_RIGHTSIDE_UP
]
=
true
;
alternateOrientation
=
DETECT_ORIENTATION_RIGHTSIDE_UP
;
break
;
case
DETECT_ORIENTATION_RIGHTSIDE_UP
:
worker_data
->
side_data_collected
[
DETECT_ORIENTATION_UPSIDE_DOWN
]
=
true
;
alternateOrientation
=
DETECT_ORIENTATION_UPSIDE_DOWN
;
break
;
case
DETECT_ORIENTATION_ERROR
:
warnx
(
"Invalid orientation in mag_calibration_worker"
);
break
;
}
worker_data
->
side_data_collected
[
alternateOrientation
]
=
true
;
mavlink_and_console_log_info
(
worker_data
->
mavlink_fd
,
"%s side done, rotate to a different side"
,
detect_orientation_str
(
alternateOrientation
));
worker_data
->
done_count
++
;
mavlink_and_console_log_info
(
worker_data
->
mavlink_fd
,
CAL_PROGRESS_MSG
,
sensor_name
,
34
*
worker_data
->
done_count
);
...
...
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