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
1cf85b9d
Commit
1cf85b9d
authored
Dec 14, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2397 from DonLakeFlyer/SafetyFixes
APM Safety fixes
parents
781997b2
fdf1c814
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
93 additions
and
22 deletions
+93
-22
APMSafetyComponentCopter.qml
src/AutoPilotPlugins/APM/APMSafetyComponentCopter.qml
+22
-20
APMSafetyComponentSummaryCopter.qml
src/AutoPilotPlugins/APM/APMSafetyComponentSummaryCopter.qml
+69
-0
QGCCheckBox.qml
src/QmlControls/QGCCheckBox.qml
+1
-1
QGCRadioButton.qml
src/QmlControls/QGCRadioButton.qml
+1
-1
No files found.
src/AutoPilotPlugins/APM/APMSafetyComponentCopter.qml
View file @
1cf85b9d
...
...
@@ -40,7 +40,7 @@ QGCView {
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
enabled
}
property
Fact
_failsafeBattEnable
d
:
controller
.
getParameterFact
(
-
1
,
"
FS_BATT_ENABLE
"
)
property
Fact
_failsafeBattEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_BATT_ENABLE
"
)
property
Fact
_failsafeBattMah
:
controller
.
getParameterFact
(
-
1
,
"
FS_BATT_MAH
"
)
property
Fact
_failsafeBattVoltage
:
controller
.
getParameterFact
(
-
1
,
"
FS_BATT_VOLTAGE
"
)
property
Fact
_failsafeThrEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_THR_ENABLE
"
)
...
...
@@ -72,6 +72,7 @@ QGCView {
clip
:
true
anchors.fill
:
parent
boundsBehavior
:
Flickable
.
StopAtBounds
contentHeight
:
rtlSettings
.
y
+
rtlSettings
.
height
flickableDirection
:
Flickable
.
VerticalFlick
QGCLabel
{
...
...
@@ -81,13 +82,14 @@ QGCView {
}
Rectangle
{
id
:
failsafeSettings
anchors.topMargin
:
_margins
/
2
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
failsafeLabel
.
bottom
height
:
fenceAltMaxField
.
y
+
fenceAltMaxField
.
height
+
_margins
color
:
palette
.
windowShade
id
:
failsafeSettings
anchors.topMargin
:
_margins
/
2
anchors.rightMargin
:
_margins
anchors.left
:
parent
.
left
anchors.top
:
failsafeLabel
.
bottom
width
:
throttleEnableCombo
.
x
+
throttleEnableCombo
.
x
+
_margins
height
:
mahField
.
y
+
mahField
.
height
+
_margins
color
:
palette
.
windowShade
QGCLabel
{
id
:
throttleEnableLabel
...
...
@@ -141,9 +143,9 @@ QGCView {
anchors.top
:
throttlePWMField
.
bottom
width
:
voltageField
.
width
model
:
[
"
Disabled
"
,
"
Land
"
,
"
Return to Launch
"
]
currentIndex
:
_failsafeBattEnable
d
.
value
currentIndex
:
_failsafeBattEnable
.
value
onActivated
:
_failsafeBattEnable
d
.
value
=
index
onActivated
:
_failsafeBattEnable
.
value
=
index
}
QGCCheckBox
{
...
...
@@ -190,21 +192,20 @@ QGCView {
QGCLabel
{
id
:
geoFenceLabel
anchors.topMargin
:
_margins
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
failsafeSettings
.
bottom
text
:
"
GeoFence
"
font.weight
:
Font
.
DemiBold
anchors.leftMargin
:
_margins
anchors.left
:
failsafeSettings
.
right
anchors.top
:
parent
.
top
text
:
"
GeoFence
"
font.weight
:
Font
.
DemiBold
}
Rectangle
{
id
:
geoFenceSettings
anchors.topMargin
:
_margins
/
2
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.left
:
geoFenceLabel
.
left
anchors.top
:
geoFenceLabel
.
bottom
height
:
fenceAltMaxField
.
y
+
fenceAltMaxField
.
height
+
_margins
anchors.bottom
:
failsafeSettings
.
bottom
width
:
fenceAltMaxField
.
x
+
fenceAltMaxField
.
width
+
_margins
color
:
palette
.
windowShade
QGCCheckBox
{
...
...
@@ -324,10 +325,11 @@ QGCView {
}
Rectangle
{
id
:
rtlSettings
anchors.topMargin
:
_margins
/
2
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
rtlLabel
.
bottom
width
:
rltAltFinalField
.
x
+
rltAltFinalField
.
width
+
_margins
height
:
rltAltFinalField
.
y
+
rltAltFinalField
.
height
+
_margins
color
:
palette
.
windowShade
...
...
src/AutoPilotPlugins/APM/APMSafetyComponentSummaryCopter.qml
View file @
1cf85b9d
...
...
@@ -14,6 +14,9 @@ FactPanel {
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
FactPanelController
{
id
:
controller
;
factPanel
:
panel
}
property
Fact
_failsafeBattEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_BATT_ENABLE
"
)
property
Fact
_failsafeThrEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_THR_ENABLE
"
)
property
Fact
_fenceAction
:
controller
.
getParameterFact
(
-
1
,
"
FENCE_ACTION
"
)
property
Fact
_fenceEnable
:
controller
.
getParameterFact
(
-
1
,
"
FENCE_ENABLE
"
)
property
Fact
_fenceType
:
controller
.
getParameterFact
(
-
1
,
"
FENCE_TYPE
"
)
...
...
@@ -23,10 +26,75 @@ FactPanel {
property
Fact
_rtlAltFinalFact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_ALT_FINAL
"
)
property
Fact
_landSpeedFact
:
controller
.
getParameterFact
(
-
1
,
"
LAND_SPEED
"
)
property
string
_failsafeBattEnableText
property
string
_failsafeThrEnableText
Component.onCompleted
:
{
setFailsafeBattEnableText
()
setFailsafeThrEnableText
()
}
Connections
{
target
:
_failsafeBattEnable
onValueChanged
:
setFailsafeBattEnableText
()
}
Connections
{
target
:
_failsafeThrEnable
onValueChanged
:
setFailsafeThrEnableText
()
}
function
setFailsafeThrEnableText
()
{
switch
(
_failsafeThrEnable
.
value
)
{
case
0
:
_failsafeThrEnableText
=
"
Disabled
"
break
case
1
:
_failsafeThrEnableText
=
"
Always RTL
"
break
case
2
:
_failsafeThrEnableText
=
"
Continue with Mission in Auto Mode
"
break
case
3
:
_failsafeThrEnableText
=
"
Always Land
"
break
default
:
_failsafeThrEnableText
=
"
Unknown
"
}
}
function
setFailsafeBattEnableText
()
{
switch
(
_failsafeBattEnable
.
value
)
{
case
0
:
_failsafeBattEnableText
=
"
Disabled
"
break
case
1
:
_failsafeBattEnableText
=
"
Land
"
break
case
2
:
_failsafeBattEnableText
=
"
Return to Launch
"
break
default
:
_failsafeThrEnableText
=
"
Unknown
"
}
}
Column
{
anchors.fill
:
parent
anchors.margins
:
8
VehicleSummaryRow
{
labelText
:
"
Throttle failsafe:
"
valueText
:
_failsafeThrEnableText
}
VehicleSummaryRow
{
labelText
:
"
Battery failsafe:
"
valueText
:
_failsafeBattEnableText
}
VehicleSummaryRow
{
labelText
:
"
GeoFence:
"
valueText
:
_fenceEnable
.
value
==
0
||
_fenceType
==
0
?
...
...
@@ -41,6 +109,7 @@ FactPanel {
valueText
:
_fenceAction
.
value
==
0
?
"
Report only
"
:
(
_fenceAction
.
value
==
1
?
"
RTL or Land
"
:
"
Unknown
"
)
visible
:
_fenceEnable
.
value
!=
0
}
VehicleSummaryRow
{
...
...
src/QmlControls/QGCCheckBox.qml
View file @
1cf85b9d
...
...
@@ -11,7 +11,7 @@ CheckBox {
style
:
CheckBoxStyle
{
label
:
Item
{
implicitWidth
:
text
.
implicitWidth
+
2
implicitHeight
:
ScreenTools
.
isMobile
?
ScreenTools
.
defaultFontPixelHeight
*
3
*
0.75
:
text
.
implicitHeight
implicitHeight
:
text
.
implicitHeight
baselineOffset
:
text
.
baselineOffset
Rectangle
{
anchors.fill
:
text
...
...
src/QmlControls/QGCRadioButton.qml
View file @
1cf85b9d
...
...
@@ -11,7 +11,7 @@ RadioButton {
style
:
RadioButtonStyle
{
label
:
Item
{
implicitWidth
:
text
.
implicitWidth
+
2
implicitHeight
:
ScreenTools
.
isMobile
?
ScreenTools
.
defaultFontPixelHeight
*
3
*
0.75
:
text
.
implicitHeight
implicitHeight
:
text
.
implicitHeight
baselineOffset
:
text
.
y
+
text
.
baselineOffset
Rectangle
{
anchors.fill
:
text
...
...
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