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
b6e722c6
Commit
b6e722c6
authored
Jun 29, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert to QGCView
parent
fb26f834
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
218 additions
and
211 deletions
+218
-211
SafetyComponent.qml
src/AutoPilotPlugins/PX4/SafetyComponent.qml
+218
-211
No files found.
src/AutoPilotPlugins/PX4/SafetyComponent.qml
View file @
b6e722c6
...
...
@@ -31,11 +31,12 @@ import QGroundControl.Palette 1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
FactPanel
{
id
:
panel
QGCView
{
id
:
rootQGCView
viewPanel
:
view
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
enabled
}
FactPanelController
{
id
:
controller
;
factPanel
:
panel
}
FactPanelController
{
id
:
controller
;
factPanel
:
rootQGCView
}
property
int
flightLineWidth
:
2
// width of lines for flight graphic
property
int
loiterAltitudeColumnWidth
:
180
// width of loiter altitude column
...
...
@@ -47,265 +48,271 @@ FactPanel {
property
int
arrowWidth
:
18
// width for arrow graphic
property
int
firstColumnWidth
:
220
// Width of first column in return home triggers area
Column
{
QGCView
{
id
:
view
anchors.fill
:
parent
QGCLabel
{
text
:
"
SAFETY CONFIG
"
font.pixelSize
:
ScreenTools
.
largeFontPixelSize
}
Column
{
anchors.fill
:
parent
Item
{
height
:
20
;
width
:
10
}
// spacer
QGCLabel
{
text
:
"
SAFETY CONFIG
"
font.pixelSize
:
ScreenTools
.
largeFontPixelSize
}
//-----------------------------------------------------------------
//-- Return Home Triggers
Item
{
height
:
20
;
width
:
10
}
// spacer
QGCLabel
{
text
:
"
Triggers For Return Home
"
;
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
;
}
//-----------------------------------------------------------------
//-- Return Home Triggers
Item
{
height
:
10
;
width
:
10
}
// spacer
QGCLabel
{
text
:
"
Triggers For Return Home
"
;
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
;
}
Rectangle
{
width
:
parent
.
width
height
:
triggerColumn
.
height
color
:
palette
.
windowShade
Item
{
height
:
10
;
width
:
10
}
// spacer
Column
{
id
:
triggerColumn
spacing
:
controlVerticalSpacing
anchors.margins
:
shadedMargin
anchors.left
:
parent
.
left
Rectangle
{
width
:
parent
.
width
height
:
triggerColumn
.
height
color
:
palette
.
windowShade
// Top margin
Item
{
height
:
1
;
width
:
10
}
Column
{
id
:
triggerColumn
spacing
:
controlVerticalSpacing
anchors.margins
:
shadedMargin
anchors.left
:
parent
.
left
Row
{
spacing
:
10
QGCLabel
{
text
:
"
RC Transmitter Signal Loss
"
;
width
:
firstColumnWidth
;
anchors.baseline
:
rcLossField
.
baseline
}
QGCLabel
{
text
:
"
Return Home after
"
;
anchors.baseline
:
rcLossField
.
baseline
}
FactTextField
{
id
:
rcLossField
fact
:
controller
.
getParameterFact
(
-
1
,
"
COM_RC_LOSS_T
"
)
showUnits
:
true
}
}
// Top margin
Item
{
height
:
1
;
width
:
10
}
Row
{
spacing
:
10
FactCheckBox
{
id
:
telemetryTimeoutCheckbox
anchors.baseline
:
telemetryLossField
.
baseline
width
:
firstColumnWidth
fact
:
controller
.
getParameterFact
(
-
1
,
"
COM_DL_LOSS_EN
"
)
checkedValue
:
1
uncheckedValue
:
0
text
:
"
Telemetry Signal Timeout
"
Row
{
spacing
:
10
QGCLabel
{
text
:
"
RC Transmitter Signal Loss
"
;
width
:
firstColumnWidth
;
anchors.baseline
:
rcLossField
.
baseline
}
QGCLabel
{
text
:
"
Return Home after
"
;
anchors.baseline
:
rcLossField
.
baseline
}
FactTextField
{
id
:
rcLossField
fact
:
controller
.
getParameterFact
(
-
1
,
"
COM_RC_LOSS_T
"
)
showUnits
:
true
}
}
QGCLabel
{
text
:
"
Return Home after
"
;
anchors.baseline
:
telemetryLossField
.
baseline
}
FactTextField
{
id
:
telemetryLossField
fact
:
controller
.
getParameterFact
(
-
1
,
"
COM_DL_LOSS_T
"
)
showUnits
:
true
enabled
:
telemetryTimeoutCheckbox
.
checked
Row
{
spacing
:
10
FactCheckBox
{
id
:
telemetryTimeoutCheckbox
anchors.baseline
:
telemetryLossField
.
baseline
width
:
firstColumnWidth
fact
:
controller
.
getParameterFact
(
-
1
,
"
COM_DL_LOSS_EN
"
)
checkedValue
:
1
uncheckedValue
:
0
text
:
"
Telemetry Signal Timeout
"
}
QGCLabel
{
text
:
"
Return Home after
"
;
anchors.baseline
:
telemetryLossField
.
baseline
}
FactTextField
{
id
:
telemetryLossField
fact
:
controller
.
getParameterFact
(
-
1
,
"
COM_DL_LOSS_T
"
)
showUnits
:
true
enabled
:
telemetryTimeoutCheckbox
.
checked
}
}
}
// Bottom margin
Item
{
height
:
1
;
width
:
10
}
// Bottom margin
Item
{
height
:
1
;
width
:
10
}
}
}
}
Item
{
height
:
20
;
width
:
10
}
// spacer
//-----------------------------------------------------------------
//-- Return Home Settings
Item
{
height
:
20
;
width
:
10
}
// spacer
QGCLabel
{
text
:
"
Return Home Settings
"
;
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
;
}
//-----------------------------------------------------------------
//-- Return Home Settings
Item
{
height
:
10
;
width
:
10
}
// spacer
QGCLabel
{
text
:
"
Return Home Settings
"
;
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
;
}
Rectangle
{
width
:
parent
.
width
height
:
settingsColumn
.
height
color
:
palette
.
windowShade
Item
{
height
:
10
;
width
:
10
}
// spacer
Column
{
id
:
settingsColumn
width
:
parent
.
width
anchors.margins
:
shadedMargin
anchors.left
:
parent
.
left
Rectangle
{
width
:
parent
.
width
height
:
settingsColumn
.
height
color
:
palette
.
windowShade
Item
{
height
:
shadedMargin
;
width
:
10
}
// top margin
Column
{
id
:
settingsColumn
width
:
parent
.
width
anchors.margins
:
shadedMargin
anchors.left
:
parent
.
left
// This item is the holder for the climb alt and loiter seconds fields
Item
{
width
:
parent
.
width
height
:
climbAltitudeColumn
.
height
Item
{
height
:
shadedMargin
;
width
:
10
}
// top margin
Column
{
id
:
climbAltitudeColumn
spacing
:
controlVerticalSpacing
QGCLabel
{
text
:
"
Climb to altitude of
"
}
FactTextField
{
id
:
climbField
fact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_RETURN_ALT
"
)
showUnits
:
true
// This item is the holder for the climb alt and loiter seconds fields
Item
{
width
:
parent
.
width
height
:
climbAltitudeColumn
.
height
Column
{
id
:
climbAltitudeColumn
spacing
:
controlVerticalSpacing
QGCLabel
{
text
:
"
Climb to altitude of
"
}
FactTextField
{
id
:
climbField
fact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_RETURN_ALT
"
)
showUnits
:
true
}
}
}
Column
{
x
:
flightGraphic
.
width
-
200
spacing
:
controlVerticalSpacing
Column
{
x
:
flightGraphic
.
width
-
200
spacing
:
controlVerticalSpacing
QGCCheckBox
{
id
:
homeLoiterCheckbox
checked
:
fact
.
value
>
0
text
:
"
Loiter at Home altitude for
"
QGCCheckBox
{
id
:
homeLoiterCheckbox
checked
:
fact
.
value
>
0
text
:
"
Loiter at Home altitude for
"
property
Fact
fact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_LAND_DELAY
"
)
property
Fact
fact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_LAND_DELAY
"
)
onClicked
:
{
fact
.
value
=
checked
?
60
:
-
1
onClicked
:
{
fact
.
value
=
checked
?
60
:
-
1
}
}
}
FactTextField
{
fact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_LAND_DELAY
"
)
showUnits
:
true
enabled
:
homeLoiterCheckbox
.
checked
==
true
FactTextField
{
fact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_LAND_DELAY
"
)
showUnits
:
true
enabled
:
homeLoiterCheckbox
.
checked
==
true
}
}
}
}
Item
{
height
:
20
;
width
:
10
}
// spacer
Item
{
height
:
20
;
width
:
10
}
// spacer
// This row holds the flight graphic and the home loiter alt column
Row
{
width
:
parent
.
width
spacing
:
20
// This row holds the flight graphic and the home loiter alt column
Row
{
width
:
parent
.
width
spacing
:
20
// Flight graphic
Item
{
id
:
flightGraphic
width
:
parent
.
width
-
loiterAltitudeColumnWidth
height
:
200
// controls the height of the flight graphic
Rectangle
{
x
:
planeWidth
/
2
height
:
planeImage
.
y
-
5
width
:
flightLineWidth
color
:
palette
.
button
}
Rectangle
{
x
:
planeWidth
/
2
height
:
flightLineWidth
width
:
parent
.
width
-
x
color
:
palette
.
button
}
Rectangle
{
x
:
parent
.
width
-
flightLineWidth
height
:
parent
.
height
-
homeWidth
-
arrowToHomeSpacing
width
:
flightLineWidth
color
:
palette
.
button
}
// Flight graphic
Item
{
id
:
flightGraphic
width
:
parent
.
width
-
loiterAltitudeColumnWidth
height
:
200
// controls the height of the flight graphic
QGCColoredImage
{
id
:
planeImage
y
:
parent
.
height
-
planeWidth
-
40
source
:
"
/qmlimages/SafetyComponentPlane.png
"
fillMode
:
Image
.
PreserveAspectFit
width
:
planeWidth
height
:
planeWidth
smooth
:
true
color
:
palette
.
button
}
Rectangle
{
x
:
planeWidth
/
2
height
:
planeImage
.
y
-
5
width
:
flightLineWidth
color
:
palette
.
button
}
Rectangle
{
x
:
planeWidth
/
2
height
:
flightLineWidth
width
:
parent
.
width
-
x
color
:
palette
.
button
}
Rectangle
{
x
:
parent
.
width
-
flightLineWidth
height
:
parent
.
height
-
homeWidth
-
arrowToHomeSpacing
width
:
flightLineWidth
color
:
palette
.
button
}
QGCColoredImage
{
x
:
planeWidth
+
70
y
:
parent
.
height
-
height
-
2
0
width
:
80
height
:
parent
.
height
/
2
source
:
"
/qmlimages/SafetyComponentTree.svg
"
fillMode
:
Image
.
Stretc
h
smooth
:
true
color
:
palette
.
windowShadeDark
}
QGCColoredImage
{
id
:
planeImage
y
:
parent
.
height
-
planeWidth
-
4
0
source
:
"
/qmlimages/SafetyComponentPlane.png
"
fillMode
:
Image
.
PreserveAspectFit
width
:
planeWidth
height
:
planeWidt
h
smooth
:
true
color
:
palette
.
button
}
QGCColoredImage
{
x
:
planeWidth
+
15
y
:
parent
.
height
-
height
width
:
10
0
height
:
parent
.
height
*
.
75
source
:
"
/qmlimages/SafetyComponentTree.svg
"
fillMode
:
Image
.
PreserveAspectFit
smooth
:
true
color
:
palette
.
button
}
QGCColoredImage
{
x
:
planeWidth
+
70
y
:
parent
.
height
-
height
-
20
width
:
8
0
height
:
parent
.
height
/
2
source
:
"
/qmlimages/SafetyComponentTree.svg
"
fillMode
:
Image
.
Stretch
smooth
:
true
color
:
palette
.
windowShadeDark
}
QGCColoredImage
{
x
:
parent
.
width
-
(
arrowWidth
/
2
)
-
1
y
:
parent
.
height
-
homeWidth
-
arrowToHomeSpacing
-
2
source
:
"
/qmlimages/SafetyComponentArrowDown.png
"
fillMode
:
Image
.
PreserveAspectFit
width
:
arrowWidth
height
:
arrowWidth
smooth
:
true
color
:
palette
.
button
}
QGCColoredImage
{
x
:
planeWidth
+
15
y
:
parent
.
height
-
height
width
:
100
height
:
parent
.
height
*
.
75
source
:
"
/qmlimages/SafetyComponentTree.svg
"
fillMode
:
Image
.
PreserveAspectFit
smooth
:
true
color
:
palette
.
button
}
QGCColoredImage
{
x
:
parent
.
width
-
(
arrowWidth
/
2
)
-
1
y
:
parent
.
height
-
homeWidth
-
arrowToHomeSpacing
-
2
source
:
"
/qmlimages/SafetyComponentArrowDown.png
"
fillMode
:
Image
.
PreserveAspectFit
width
:
arrowWidth
height
:
arrowWidth
smooth
:
true
color
:
palette
.
button
}
QGCColoredImage
{
id
:
homeImage
x
:
parent
.
width
-
(
homeWidth
/
2
)
y
:
parent
.
height
-
homeWidth
source
:
"
/qmlimages/SafetyComponentHome.png
"
fillMode
:
Image
.
PreserveAspectFit
width
:
homeWidth
height
:
homeWidth
smooth
:
true
color
:
palette
.
button
QGCColoredImage
{
id
:
homeImage
x
:
parent
.
width
-
(
homeWidth
/
2
)
y
:
parent
.
height
-
homeWidth
source
:
"
/qmlimages/SafetyComponentHome.png
"
fillMode
:
Image
.
PreserveAspectFit
width
:
homeWidth
height
:
homeWidth
smooth
:
true
color
:
palette
.
button
}
}
}
Column
{
spacing
:
controlVerticalSpacing
Column
{
spacing
:
controlVerticalSpacing
QGCLabel
{
text
:
"
Home loiter altitude
"
;
color
:
palette
.
text
;
enabled
:
homeLoiterCheckbox
.
checked
===
true
}
FactTextField
{
id
:
descendField
;
fact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_DESCEND_ALT
"
)
enabled
:
homeLoiterCheckbox
.
checked
===
true
showUnits
:
true
QGCLabel
{
text
:
"
Home loiter altitude
"
;
color
:
palette
.
text
;
enabled
:
homeLoiterCheckbox
.
checked
===
true
}
FactTextField
{
id
:
descendField
;
fact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_DESCEND_ALT
"
)
enabled
:
homeLoiterCheckbox
.
checked
===
true
showUnits
:
true
}
}
}
}
Item
{
height
:
shadedMargin
;
width
:
10
}
// bottom margin
Item
{
height
:
shadedMargin
;
width
:
10
}
// bottom margin
}
}
}
QGCLabel
{
width
:
parent
.
width
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
text
:
"
Warning: You have an advanced safety configuration set using the NAV_RCL_OBC parameter. The above settings may not apply.
"
;
visible
:
fact
.
value
!==
0
wrapMode
:
Text
.
Wrap
QGCLabel
{
width
:
parent
.
width
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
text
:
"
Warning: You have an advanced safety configuration set using the NAV_RCL_OBC parameter. The above settings may not apply.
"
;
visible
:
fact
.
value
!==
0
wrapMode
:
Text
.
Wrap
property
Fact
fact
:
controller
.
getParameterFact
(
-
1
,
"
NAV_RCL_OBC
"
)
}
property
Fact
fact
:
controller
.
getParameterFact
(
-
1
,
"
NAV_RCL_OBC
"
)
}
QGCLabel
{
width
:
parent
.
width
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
text
:
"
Warning: You have an advanced safety configuration set using the NAV_DLL_OBC parameter. The above settings may not apply.
"
;
visible
:
fact
.
value
!==
0
wrapMode
:
Text
.
Wrap
QGCLabel
{
width
:
parent
.
width
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
text
:
"
Warning: You have an advanced safety configuration set using the NAV_DLL_OBC parameter. The above settings may not apply.
"
;
visible
:
fact
.
value
!==
0
wrapMode
:
Text
.
Wrap
property
Fact
fact
:
controller
.
getParameterFact
(
-
1
,
"
NAV_DLL_OBC
"
)
property
Fact
fact
:
controller
.
getParameterFact
(
-
1
,
"
NAV_DLL_OBC
"
)
}
}
}
}
// QGCVIew
}
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