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
0c6ae2a7
Commit
0c6ae2a7
authored
Feb 26, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle sensor difference for Fixed Wing
parent
059df23d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
15 deletions
+86
-15
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
SensorsComponent.cc
src/AutoPilotPlugins/PX4/SensorsComponent.cc
+19
-4
SensorsComponentSummary.qml
src/AutoPilotPlugins/PX4/SensorsComponentSummary.qml
+4
-11
SensorsComponentSummaryFixedWing.qml
...AutoPilotPlugins/PX4/SensorsComponentSummaryFixedWing.qml
+62
-0
No files found.
qgroundcontrol.qrc
View file @
0c6ae2a7
...
...
@@ -268,6 +268,7 @@
<file alias="SafetyComponentSummary.qml">src/AutoPilotPlugins/PX4/SafetyComponentSummary.qml</file>
<file alias="SensorsComponentSummary.qml">src/AutoPilotPlugins/PX4/SensorsComponentSummary.qml</file>
<file alias="SensorsComponentSummaryFixedWing.qml">src/AutoPilotPlugins/PX4/SensorsComponentSummaryFixedWing.qml</file>
<file alias="RadioComponentSummary.qml">src/AutoPilotPlugins/PX4/RadioComponentSummary.qml</file>
<file alias="FlightModesComponentSummary.qml">src/AutoPilotPlugins/PX4/FlightModesComponentSummary.qml</file>
<file alias="AirframeComponentSummary.qml">src/AutoPilotPlugins/PX4/AirframeComponentSummary.qml</file>
...
...
src/AutoPilotPlugins/PX4/SensorsComponent.cc
View file @
0c6ae2a7
...
...
@@ -31,8 +31,10 @@
// These two list must be kept in sync
/// @brief Parameters which signal a change in setupComplete state
static
const
char
*
triggerParamsV1
[]
=
{
"SENS_MAG_XOFF"
,
"SENS_GYRO_XOFF"
,
"SENS_ACC_XOFF"
,
"SENS_DPRES_OFF"
,
NULL
};
static
const
char
*
triggerParamsV2
[]
=
{
"CAL_MAG0_ID"
,
"CAL_GYRO0_ID"
,
"CAL_ACC0_ID"
,
"SENS_DPRES_OFF"
,
NULL
};
static
const
char
*
triggerParamsV1
[]
=
{
"SENS_MAG_XOFF"
,
"SENS_GYRO_XOFF"
,
"SENS_ACC_XOFF"
,
NULL
};
static
const
char
*
triggerParamsV2
[]
=
{
"CAL_MAG0_ID"
,
"CAL_GYRO0_ID"
,
"CAL_ACC0_ID"
,
NULL
};
static
const
char
*
triggerParamsV1FixedWing
[]
=
{
"SENS_MAG_XOFF"
,
"SENS_GYRO_XOFF"
,
"SENS_ACC_XOFF"
,
"SENS_DPRES_OFF"
,
NULL
};
static
const
char
*
triggerParamsV2FixedWing
[]
=
{
"CAL_MAG0_ID"
,
"CAL_GYRO0_ID"
,
"CAL_ACC0_ID"
,
"SENS_DPRES_OFF"
,
NULL
};
SensorsComponent
::
SensorsComponent
(
UASInterface
*
uas
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
)
:
PX4Component
(
uas
,
autopilot
,
parent
),
...
...
@@ -102,7 +104,11 @@ QString SensorsComponent::setupStateDescription(void) const
const
char
**
SensorsComponent
::
setupCompleteChangedTriggerList
(
void
)
const
{
return
_paramsV1
?
triggerParamsV1
:
triggerParamsV2
;
if
(
_uas
->
getSystemType
()
==
MAV_TYPE_FIXED_WING
)
{
return
_paramsV1
?
triggerParamsV1FixedWing
:
triggerParamsV2FixedWing
;
}
else
{
return
_paramsV1
?
triggerParamsV1
:
triggerParamsV2
;
}
}
QStringList
SensorsComponent
::
paramFilterList
(
void
)
const
...
...
@@ -125,7 +131,16 @@ QWidget* SensorsComponent::setupWidget(void) const
QUrl
SensorsComponent
::
summaryQmlSource
(
void
)
const
{
return
QUrl
::
fromUserInput
(
"qrc:/qml/SensorsComponentSummary.qml"
);
QString
summaryQml
;
qDebug
()
<<
_uas
->
getSystemType
();
if
(
_uas
->
getSystemType
()
==
MAV_TYPE_FIXED_WING
)
{
summaryQml
=
"qrc:/qml/SensorsComponentSummaryFixedWing.qml"
;
}
else
{
summaryQml
=
"qrc:/qml/SensorsComponentSummary.qml"
;
}
return
QUrl
::
fromUserInput
(
summaryQml
);
}
QString
SensorsComponent
::
prerequisiteSetup
(
void
)
const
...
...
src/AutoPilotPlugins/PX4/SensorsComponentSummary.qml
View file @
0c6ae2a7
...
...
@@ -5,6 +5,10 @@ import QtQuick.Controls.Styles 1.2
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
Controls
1.0
/*
IMPORTANT NOTE: Any changes made here must also be made to SensorsComponentSummaryFixedWing.qml
*/
Column
{
anchors.fill
:
parent
anchors.margins
:
8
...
...
@@ -44,15 +48,4 @@ Column {
text
:
setupRequiredValue
==
0
?
"
Setup required
"
:
"
Ready
"
}
}
Row
{
width
:
parent
.
width
QGCLabel
{
id
:
airspeed
;
text
:
"
Airspeed:
"
}
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
;
width
:
parent
.
width
-
airspeed
.
contentWidth
;
text
:
autopilot
.
parameters
[
"
SENS_DPRES_OFF
"
].
value
==
0.0
?
"
Setup required
"
:
"
Ready
"
}
}
}
src/AutoPilotPlugins/PX4/SensorsComponentSummaryFixedWing.qml
0 → 100644
View file @
0c6ae2a7
import
QtQuick
2.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
Controls
1.0
/*
IMPORTANT NOTE: Any changes made here must also be made to SensorsComponentSummary.qml
*/
Column
{
anchors.fill
:
parent
anchors.margins
:
8
Row
{
width
:
parent
.
width
QGCLabel
{
id
:
compass
;
text
:
"
Compass:
"
}
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
;
width
:
parent
.
width
-
compass
.
contentWidth
;
property
bool
setupRequiredValue
:
autopilot
.
parameters
[
"
SENS_MAG_XOFF
"
]
?
autopilot
.
parameters
[
"
SENS_MAG_XOFF
"
].
value
:
autopilot
.
parameters
[
"
CAL_MAG0_ID
"
].
value
text
:
setupRequiredValue
==
0
?
"
Setup required
"
:
"
Ready
"
}
}
Row
{
width
:
parent
.
width
QGCLabel
{
id
:
gyro
;
text
:
"
Gyro:
"
}
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
;
width
:
parent
.
width
-
gyro
.
contentWidth
;
property
bool
setupRequiredValue
:
autopilot
.
parameters
[
"
SENS_GYRO_XOFF
"
]
?
autopilot
.
parameters
[
"
SENS_GYRO_XOFF
"
].
value
:
autopilot
.
parameters
[
"
CAL_GYRO0_ID
"
].
value
text
:
setupRequiredValue
==
0
?
"
Setup required
"
:
"
Ready
"
}
}
Row
{
width
:
parent
.
width
QGCLabel
{
id
:
accel
;
text
:
"
Accelerometer:
"
}
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
;
width
:
parent
.
width
-
accel
.
contentWidth
;
property
bool
setupRequiredValue
:
autopilot
.
parameters
[
"
SENS_ACC_XOFF
"
]
?
autopilot
.
parameters
[
"
SENS_ACC_XOFF
"
].
value
:
autopilot
.
parameters
[
"
CAL_ACC0_ID
"
].
value
text
:
setupRequiredValue
==
0
?
"
Setup required
"
:
"
Ready
"
}
}
Row
{
width
:
parent
.
width
QGCLabel
{
id
:
airspeed
;
text
:
"
Airspeed:
"
}
QGCLabel
{
horizontalAlignment
:
Text
.
AlignRight
;
width
:
parent
.
width
-
airspeed
.
contentWidth
;
text
:
autopilot
.
parameters
[
"
SENS_DPRES_OFF
"
].
value
==
0.0
?
"
Setup required
"
:
"
Ready
"
}
}
}
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