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
da45a457
Commit
da45a457
authored
Oct 10, 2016
by
Rustom Jehangir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve Sub safety page to match firmware capabilities
parent
adc0c941
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
181 deletions
+42
-181
APMSafetyComponentSub.qml
src/AutoPilotPlugins/APM/APMSafetyComponentSub.qml
+22
-132
APMSafetyComponentSummarySub.qml
src/AutoPilotPlugins/APM/APMSafetyComponentSummarySub.qml
+20
-49
No files found.
src/AutoPilotPlugins/APM/APMSafetyComponentSub.qml
View file @
da45a457
This diff is collapsed.
Click to expand it.
src/AutoPilotPlugins/APM/APMSafetyComponentSummarySub.qml
View file @
da45a457
...
...
@@ -14,69 +14,42 @@ FactPanel {
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
FactPanelController
{
id
:
controller
;
factPanel
:
panel
}
property
Fact
_failsafe
BattEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_BATT
_ENABLE
"
)
property
Fact
_failsafe
ThrEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_THR
_ENABLE
"
)
property
Fact
_failsafe
GCSEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_GCS
_ENABLE
"
)
property
Fact
_failsafe
LeakEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_LEAK
_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
"
)
property
Fact
_leakPin
:
controller
.
getParameterFact
(
-
1
,
"
WD_1_PIN
"
)
property
Fact
_leakPin
:
controller
.
getParameterFact
(
-
1
,
"
WD_1_PIN
"
)
property
Fact
_armingCheck
:
controller
.
getParameterFact
(
-
1
,
"
ARMING_CHECK
"
)
property
string
_failsafeBattEnableText
property
string
_failsafeThrEnableText
property
string
_failsafeGCSEnableText
Component.onCompleted
:
{
setFailsafeBattEnableText
()
setFailsafeThrEnableText
()
setFailsafeGCSEnableText
()
}
Connections
{
target
:
_failsafe
Batt
Enable
target
:
_failsafe
GCS
Enable
onValueChanged
:
setFailsafe
Batt
EnableText
()
onValueChanged
:
setFailsafe
GCS
EnableText
()
}
Connections
{
target
:
_failsafeThrEnable
onValueChanged
:
setFailsafeThrEnableText
()
}
function
setFailsafeThrEnableText
()
{
switch
(
_failsafeThrEnable
.
value
)
{
case
0
:
_failsafeThrEnableText
=
qsTr
(
"
Disabled
"
)
break
case
1
:
_failsafeThrEnableText
=
qsTr
(
"
Always RTL
"
)
break
case
2
:
_failsafeThrEnableText
=
qsTr
(
"
Continue with Mission in Auto Mode
"
)
break
case
3
:
_failsafeThrEnableText
=
qsTr
(
"
Always Land
"
)
break
default
:
_failsafeThrEnableText
=
qsTr
(
"
Unknown
"
)
}
}
function
setFailsafeBattEnableText
()
{
switch
(
_failsafeBattEnable
.
value
)
{
function
setFailsafeGCSEnableText
()
{
switch
(
_failsafeGCSEnable
.
value
)
{
case
0
:
_failsafe
Batt
EnableText
=
qsTr
(
"
Disabled
"
)
_failsafe
GCS
EnableText
=
qsTr
(
"
Disabled
"
)
break
case
1
:
_failsafe
BattEnableText
=
qsTr
(
"
Land
"
)
_failsafe
GCSEnableText
=
qsTr
(
"
Always RTL
"
)
break
case
2
:
_failsafe
BattEnableText
=
qsTr
(
"
Return to Launch
"
)
_failsafe
GCSEnableText
=
qsTr
(
"
Continue with Mission in Auto Mode
"
)
break
default
:
_failsafe
Thr
EnableText
=
qsTr
(
"
Unknown
"
)
_failsafe
GCS
EnableText
=
qsTr
(
"
Unknown
"
)
}
}
...
...
@@ -89,13 +62,13 @@ FactPanel {
}
VehicleSummaryRow
{
labelText
:
qsTr
(
"
Throttle
failsafe:
"
)
valueText
:
_failsafeThr
EnableText
labelText
:
qsTr
(
"
GCS
failsafe:
"
)
valueText
:
_failsafeGCS
EnableText
}
VehicleSummaryRow
{
labelText
:
qsTr
(
"
Battery
failsafe:
"
)
valueText
:
_failsafe
BattEnableText
labelText
:
qsTr
(
"
Leak
failsafe:
"
)
valueText
:
_failsafe
LeakEnable
.
value
?
qsTr
(
"
Enabled
"
)
:
qsTr
(
"
Disabled
"
)
}
VehicleSummaryRow
{
...
...
@@ -108,15 +81,13 @@ FactPanel {
valueText
:
_fenceEnable
.
value
==
0
||
_fenceType
==
0
?
qsTr
(
"
Disabled
"
)
:
(
_fenceType
.
value
==
1
?
qsTr
(
"
Altitude
"
)
:
(
_fenceType
.
value
==
2
?
qsTr
(
"
Circle
"
)
:
qsTr
(
"
Altitude
,Circle
"
)))
qsTr
(
"
Depth
"
)
:
(
_fenceType
.
value
==
2
?
qsTr
(
"
Circle
"
)
:
qsTr
(
"
Depth
,Circle
"
)))
}
VehicleSummaryRow
{
labelText
:
qsTr
(
"
GeoFence:
"
)
valueText
:
_fenceAction
.
value
==
0
?
qsTr
(
"
Report only
"
)
:
(
_fenceAction
.
value
==
1
?
qsTr
(
"
RTL or Land
"
)
:
qsTr
(
"
Unknown
"
))
valueText
:
qsTr
(
"
Report only
"
)
visible
:
_fenceEnable
.
value
!=
0
}
}
...
...
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