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
716d030a
Commit
716d030a
authored
Oct 21, 2017
by
DonLakeFlyer
Browse files
Don't show/calibrated compass which are turned off
parent
833b5e21
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/AutoPilotPlugins/APM/APMSensorsComponent.qml
View file @
716d030a
...
...
@@ -169,7 +169,7 @@ SetupPage {
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
Math
.
round
(
ScreenTools
.
defaultFontPixelHeight
/
2
)
visible
:
sensorParams
.
rgCompassAvailable
[
index
]
visible
:
sensorParams
.
rgCompassAvailable
[
index
]
&&
sensorParams
.
rgCompassUseFact
[
index
].
value
property
real
greenMaxThreshold
:
8
*
(
sensorParams
.
rgCompassExternal
[
index
]
?
1
:
2
)
property
real
yellowMaxThreshold
:
15
*
(
sensorParams
.
rgCompassExternal
[
index
]
?
1
:
2
)
...
...
src/AutoPilotPlugins/APM/APMSensorsComponentController.cc
View file @
716d030a
...
...
@@ -226,7 +226,8 @@ void APMSensorsComponentController::_mavCommandResult(int vehicleId, int compone
_startLogCalibration
();
uint8_t
compassBits
=
0
;
if
(
getParameterFact
(
FactSystem
::
defaultComponentId
,
"COMPASS_DEV_ID"
)
->
rawValue
().
toInt
()
>
0
)
{
if
(
getParameterFact
(
FactSystem
::
defaultComponentId
,
"COMPASS_DEV_ID"
)
->
rawValue
().
toInt
()
>
0
&&
getParameterFact
(
FactSystem
::
defaultComponentId
,
QStringLiteral
(
"COMPASS_USE"
))
->
rawValue
().
toBool
())
{
compassBits
|=
1
<<
0
;
qCDebug
(
APMSensorsComponentControllerLog
)
<<
"Performing onboard compass cal for compass 1"
;
}
else
{
...
...
@@ -234,7 +235,8 @@ void APMSensorsComponentController::_mavCommandResult(int vehicleId, int compone
_rgCompassCalSucceeded
[
0
]
=
true
;
_rgCompassCalFitness
[
0
]
=
0
;
}
if
(
getParameterFact
(
FactSystem
::
defaultComponentId
,
"COMPASS_DEV_ID2"
)
->
rawValue
().
toInt
()
>
0
)
{
if
(
getParameterFact
(
FactSystem
::
defaultComponentId
,
"COMPASS_DEV_ID2"
)
->
rawValue
().
toInt
()
>
0
&&
getParameterFact
(
FactSystem
::
defaultComponentId
,
QStringLiteral
(
"COMPASS_USE2"
))
->
rawValue
().
toBool
())
{
compassBits
|=
1
<<
1
;
qCDebug
(
APMSensorsComponentControllerLog
)
<<
"Performing onboard compass cal for compass 2"
;
}
else
{
...
...
@@ -242,7 +244,8 @@ void APMSensorsComponentController::_mavCommandResult(int vehicleId, int compone
_rgCompassCalSucceeded
[
1
]
=
true
;
_rgCompassCalFitness
[
1
]
=
0
;
}
if
(
getParameterFact
(
FactSystem
::
defaultComponentId
,
"COMPASS_DEV_ID3"
)
->
rawValue
().
toInt
()
>
0
)
{
if
(
getParameterFact
(
FactSystem
::
defaultComponentId
,
"COMPASS_DEV_ID3"
)
->
rawValue
().
toInt
()
>
0
&&
getParameterFact
(
FactSystem
::
defaultComponentId
,
QStringLiteral
(
"COMPASS_USE3"
))
->
rawValue
().
toBool
())
{
compassBits
|=
1
<<
2
;
qCDebug
(
APMSensorsComponentControllerLog
)
<<
"Performing onboard compass cal for compass 3"
;
}
else
{
...
...
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