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
86e636ab
Commit
86e636ab
authored
Aug 02, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SetupPage is usable without VehicleComponent
parent
589046c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
16 deletions
+27
-16
SetupPage.qml
src/AutoPilotPlugins/Common/SetupPage.qml
+4
-2
SetupView.qml
src/VehicleSetup/SetupView.qml
+23
-14
No files found.
src/AutoPilotPlugins/Common/SetupPage.qml
View file @
86e636ab
...
...
@@ -25,6 +25,8 @@ QGCView {
viewPanel
:
setupPanel
property
alias
pageComponent
:
pageLoader
.
sourceComponent
property
string
pageName
:
vehicleComponent
?
vehicleComponent
.
name
:
""
property
string
pageDescription
:
vehicleComponent
?
vehicleComponent
.
description
:
""
property
real
availableWidth
:
width
-
pageLoader
.
x
property
real
availableHeight
:
height
-
pageLoader
.
y
...
...
@@ -49,7 +51,7 @@ QGCView {
QGCLabel
{
font.pointSize
:
ScreenTools
.
largeFontPointSize
text
:
vehicleComponent
.
n
ame
+
"
"
+
qsTr
(
"
Setup
"
)
text
:
pageN
ame
+
"
"
+
qsTr
(
"
Setup
"
)
visible
:
!
ScreenTools
.
isShortScreen
}
...
...
@@ -57,7 +59,7 @@ QGCView {
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
wrapMode
:
Text
.
WordWrap
text
:
vehicleComponent
.
d
escription
text
:
pageD
escription
visible
:
!
ScreenTools
.
isShortScreen
}
}
...
...
src/VehicleSetup/SetupView.qml
View file @
86e636ab
...
...
@@ -45,14 +45,14 @@ Rectangle {
{
if
(
_fullParameterVehicleAvailable
)
{
if
(
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
autopilot
.
vehicleComponents
.
length
==
0
)
{
panelLoader
.
s
ourceComponent
=
noComponentsVehicleSummaryComponent
panelLoader
.
s
etSourceComponent
(
noComponentsVehicleSummaryComponent
)
}
else
{
panelLoader
.
s
ource
=
"
VehicleSummary.qml
"
;
panelLoader
.
s
etSource
(
"
VehicleSummary.qml
"
)
}
}
else
if
(
QGroundControl
.
multiVehicleManager
.
parameterReadyVehicleAvailable
)
{
panelLoader
.
s
ourceComponent
=
missingParametersVehicleSummaryComponent
panelLoader
.
s
etSourceComponent
(
missingParametersVehicleSummaryComponent
)
}
else
{
panelLoader
.
s
ourceComponent
=
disconnectedVehicleSummaryComponent
panelLoader
.
s
etSourceComponent
(
disconnectedVehicleSummaryComponent
)
}
}
...
...
@@ -61,9 +61,9 @@ Rectangle {
if
(
!
ScreenTools
.
isMobile
)
{
if
(
QGroundControl
.
multiVehicleManager
.
activeVehicleAvailable
&&
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
armed
)
{
_messagePanelText
=
_armedVehicleText
panelLoader
.
s
ourceComponent
=
messagePanelComponent
panelLoader
.
s
etSourceComponent
(
messagePanelComponent
)
}
else
{
panelLoader
.
s
ource
=
"
FirmwareUpgrade.qml
"
;
panelLoader
.
s
etSource
(
"
FirmwareUpgrade.qml
"
)
}
}
}
...
...
@@ -72,34 +72,33 @@ Rectangle {
{
if
(
QGroundControl
.
multiVehicleManager
.
activeVehicleAvailable
&&
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
armed
)
{
_messagePanelText
=
_armedVehicleText
panelLoader
.
s
ourceComponent
=
messagePanelComponent
panelLoader
.
s
etSourceComponent
(
messagePanelComponent
)
}
else
{
panelLoader
.
s
ource
=
"
JoystickConfig.qml
"
;
panelLoader
.
s
etSource
(
"
JoystickConfig.qml
"
)
}
}
function
showParametersPanel
()
{
panelLoader
.
s
ource
=
"
SetupParameterEditor.qml
"
;
panelLoader
.
s
etSource
(
"
SetupParameterEditor.qml
"
)
}
function
showPX4FlowPanel
()
{
panelLoader
.
s
ource
=
"
PX4FlowSensor.qml
"
;
panelLoader
.
s
etSource
(
"
PX4FlowSensor.qml
"
)
}
function
showVehicleComponentPanel
(
vehicleComponent
)
{
if
(
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
armed
&&
!
vehicleComponent
.
allowSetupWhileArmed
)
{
_messagePanelText
=
_armedVehicleText
panelLoader
.
s
ourceComponent
=
messagePanelComponent
panelLoader
.
s
etSourceComponent
(
messagePanelComponent
)
}
else
{
if
(
vehicleComponent
.
prerequisiteSetup
!=
""
)
{
_messagePanelText
=
vehicleComponent
.
prerequisiteSetup
+
"
setup must be completed prior to
"
+
vehicleComponent
.
name
+
"
setup.
"
panelLoader
.
s
ourceComponent
=
messagePanelComponent
panelLoader
.
s
etSourceComponent
(
messagePanelComponent
)
}
else
{
panelLoader
.
vehicleComponent
=
vehicleComponent
panelLoader
.
source
=
vehicleComponent
.
setupSource
panelLoader
.
setSource
(
vehicleComponent
.
setupSource
,
vehicleComponent
)
for
(
var
i
=
0
;
i
<
componentRepeater
.
count
;
i
++
)
{
var
obj
=
componentRepeater
.
itemAt
(
i
);
if
(
obj
.
text
===
vehicleComponent
.
name
)
{
...
...
@@ -350,6 +349,16 @@ Rectangle {
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
function
setSource
(
source
,
vehicleComponent
)
{
panelLoader
.
vehicleComponent
=
vehicleComponent
panelLoader
.
source
=
source
}
function
setSourceComponent
(
sourceComponent
,
vehicleComponent
)
{
panelLoader
.
vehicleComponent
=
vehicleComponent
panelLoader
.
sourceComponent
=
sourceComponent
}
property
var
vehicleComponent
}
}
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