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
1b083274
Commit
1b083274
authored
Jul 04, 2019
by
Gus Grubba
Browse files
Have a separate panel for Airframe Setup if the firmware is using a custom type.
parent
45a33b56
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/AutoPilotPlugins/PX4/AirframeComponent.qml
View file @
1b083274
...
...
@@ -22,7 +22,43 @@ import QGroundControl.ScreenTools 1.0
SetupPage
{
id
:
airframePage
pageComponent
:
pageComponent
pageComponent
:
(
controller
&&
controller
.
showCustomConfigPanel
)
?
customFrame
:
pageComponent
AirframeComponentController
{
id
:
controller
}
Component
{
id
:
customFrame
Column
{
width
:
availableWidth
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
4
Item
{
width
:
1
height
:
1
}
QGCLabel
{
anchors.horizontalCenter
:
parent
.
horizontalCenter
width
:
parent
.
width
*
0.5
height
:
ScreenTools
.
defaultFontPixelHeight
*
4
wrapMode
:
Text
.
WordWrap
text
:
qsTr
(
"
Your vehicle is using a custom airframe configuration.
"
)
+
qsTr
(
"
This configuration can only be modified through the Parameter Editor.
\n\n
"
)
+
qsTr
(
"
If you want to reset your airframe configuration and select a standard configuration, click 'Reset' below.
"
)
}
QGCButton
{
text
:
qsTr
(
"
Reset
"
)
enabled
:
sys_autostart
anchors.horizontalCenter
:
parent
.
horizontalCenter
property
Fact
sys_autostart
:
controller
.
getParameterFact
(
-
1
,
"
SYS_AUTOSTART
"
)
onClicked
:
{
if
(
sys_autostart
)
{
sys_autostart
.
value
=
0
}
}
}
}
}
Component
{
id
:
pageComponent
...
...
@@ -61,33 +97,6 @@ SetupPage {
}
}
AirframeComponentController
{
id
:
controller
Component.onCompleted
:
{
if
(
controller
.
showCustomConfigPanel
)
{
mainWindow
.
showComponentDialog
(
customConfigDialogComponent
,
qsTr
(
"
Custom Airframe Config
"
),
mainWindow
.
showDialogDefaultWidth
,
StandardButton
.
Reset
)
}
}
}
Component
{
id
:
customConfigDialogComponent
QGCViewMessage
{
id
:
customConfigDialog
message
:
qsTr
(
"
Your vehicle is using a custom airframe configuration.
"
)
+
qsTr
(
"
This configuration can only be modified through the Parameter Editor.
\n\n
"
)
+
qsTr
(
"
If you want to reset your airframe configuration and select a standard configuration, click 'Reset' above.
"
)
property
Fact
sys_autostart
:
controller
.
getParameterFact
(
-
1
,
"
SYS_AUTOSTART
"
)
function
accept
()
{
sys_autostart
.
value
=
0
customConfigDialog
.
hideDialog
()
}
}
}
Component
{
id
:
applyRestartDialogComponent
...
...
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