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
fd091538
Unverified
Commit
fd091538
authored
Apr 27, 2018
by
nathan
Committed by
Beat Küng
May 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow completion of the sensor page with a magnetometer if ATT_W_MAG is 0
parent
4cc35937
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
SensorsComponent.cc
src/AutoPilotPlugins/PX4/SensorsComponent.cc
+9
-2
SensorsComponent.h
src/AutoPilotPlugins/PX4/SensorsComponent.h
+3
-0
SensorsSetup.qml
src/AutoPilotPlugins/PX4/SensorsSetup.qml
+2
-1
No files found.
src/AutoPilotPlugins/PX4/SensorsComponent.cc
View file @
fd091538
...
...
@@ -20,11 +20,14 @@ const char* SensorsComponent::_airspeedBreakerParam = "CBRK_AIRSPD_CHK";
const
char
*
SensorsComponent
::
_airspeedDisabledParam
=
"FW_ARSP_MODE"
;
const
char
*
SensorsComponent
::
_airspeedCalParam
=
"SENS_DPRES_OFF"
;
const
char
*
SensorsComponent
::
_magDisabledParam
=
"ATT_W_MAG"
;
const
char
*
SensorsComponent
::
_magCalParam
=
"CAL_MAG0_ID"
;
SensorsComponent
::
SensorsComponent
(
Vehicle
*
vehicle
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
)
:
VehicleComponent
(
vehicle
,
autopilot
,
parent
),
_name
(
tr
(
"Sensors"
))
{
_deviceIds
<<
QStringLiteral
(
"CAL_
MAG0_ID"
)
<<
QStringLiteral
(
"CAL_
GYRO0_ID"
)
<<
QStringLiteral
(
"CAL_ACC0_ID"
);
_deviceIds
<<
QStringLiteral
(
"CAL_GYRO0_ID"
)
<<
QStringLiteral
(
"CAL_ACC0_ID"
);
}
QString
SensorsComponent
::
name
(
void
)
const
...
...
@@ -54,6 +57,10 @@ bool SensorsComponent::setupComplete(void) const
return
false
;
}
}
if
(
_vehicle
->
parameterManager
()
->
getParameter
(
FactSystem
::
defaultComponentId
,
_magDisabledParam
)
->
rawValue
().
toInt
()
!=
0
&&
_vehicle
->
parameterManager
()
->
getParameter
(
FactSystem
::
defaultComponentId
,
_magCalParam
)
->
rawValue
().
toFloat
()
==
0.0
f
)
{
return
false
;
}
if
(
_vehicle
->
fixedWing
()
||
_vehicle
->
vtol
())
{
if
(
!
_vehicle
->
parameterManager
()
->
getParameter
(
FactSystem
::
defaultComponentId
,
_airspeedDisabledParam
)
->
rawValue
().
toBool
()
&&
...
...
@@ -70,7 +77,7 @@ QStringList SensorsComponent::setupCompleteChangedTriggerList(void) const
{
QStringList
triggers
;
triggers
<<
_deviceIds
;
triggers
<<
_deviceIds
<<
_magCalParam
<<
_magDisabledParam
;
if
(
_vehicle
->
fixedWing
()
||
_vehicle
->
vtol
())
{
triggers
<<
_airspeedCalParam
<<
_airspeedBreakerParam
;
}
...
...
src/AutoPilotPlugins/PX4/SensorsComponent.h
View file @
fd091538
...
...
@@ -44,6 +44,9 @@ private:
static
const
char
*
_airspeedDisabledParam
;
static
const
char
*
_airspeedBreakerParam
;
static
const
char
*
_airspeedCalParam
;
static
const
char
*
_magDisabledParam
;
static
const
char
*
_magCalParam
;
};
#endif
src/AutoPilotPlugins/PX4/SensorsSetup.qml
View file @
fd091538
...
...
@@ -369,7 +369,8 @@ Item {
width
:
_buttonWidth
text
:
qsTr
(
"
Compass
"
)
indicatorGreen
:
cal_mag0_id
.
value
!==
0
visible
:
QGroundControl
.
corePlugin
.
options
.
showSensorCalibrationCompass
&&
showSensorCalibrationCompass
visible
:
controller
.
getParameterFact
(
-
1
,
"
ATT_W_MAG
"
).
value
!==
0
&&
QGroundControl
.
corePlugin
.
options
.
showSensorCalibrationCompass
&&
showSensorCalibrationCompass
onClicked
:
{
preCalibrationDialogType
=
"
compass
"
...
...
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