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
16e91924
Commit
16e91924
authored
Mar 13, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3005 from DonLakeFlyer/MoreCompass
Better param reset for APM compass cal
parents
bbdf6dde
23acfb63
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
APMCompassCal.cc
src/AutoPilotPlugins/APM/APMCompassCal.cc
+9
-13
No files found.
src/AutoPilotPlugins/APM/APMCompassCal.cc
View file @
16e91924
...
...
@@ -624,21 +624,17 @@ void APMCompassCal::startCalibration(void)
const
char
*
deviceIdParam
=
CalWorkerThread
::
rgCompassParams
[
i
][
3
];
if
(
plugin
->
parameterExists
(
-
1
,
deviceIdParam
))
{
if
(
plugin
->
getParameterFact
(
-
1
,
deviceIdParam
)
->
rawValue
().
toInt
()
>
0
)
{
for
(
int
j
=
0
;
j
<
3
;
j
++
)
{
const
char
*
offsetParam
=
CalWorkerThread
::
rgCompassParams
[
i
][
j
];
if
(
plugin
->
parameterExists
(
-
1
,
offsetParam
))
{
Fact
*
paramFact
=
plugin
->
getParameterFact
(
-
1
,
offsetParam
);
_rgSavedCompassOffsets
[
i
][
j
]
=
paramFact
->
rawValue
().
toFloat
();
paramFact
->
setRawValue
(
0.0
);
goto
has_compass
;
}
}
_calWorkerThread
->
rgCompassAvailable
[
i
]
=
plugin
->
getParameterFact
(
-
1
,
deviceIdParam
)
->
rawValue
().
toInt
()
>
0
;
for
(
int
j
=
0
;
j
<
3
;
j
++
)
{
const
char
*
offsetParam
=
CalWorkerThread
::
rgCompassParams
[
i
][
j
];
Fact
*
paramFact
=
plugin
->
getParameterFact
(
-
1
,
offsetParam
);
_rgSavedCompassOffsets
[
i
][
j
]
=
paramFact
->
rawValue
().
toFloat
();
paramFact
->
setRawValue
(
0.0
);
}
}
else
{
_calWorkerThread
->
rgCompassAvailable
[
i
]
=
false
;
}
_calWorkerThread
->
rgCompassAvailable
[
i
]
=
false
;
has_compass:
qCDebug
(
APMCompassCalLog
)
<<
QStringLiteral
(
"Compass %1 available: %2"
).
arg
(
i
).
arg
(
_calWorkerThread
->
rgCompassAvailable
[
i
]);
}
...
...
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