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
4adbf551
Commit
4adbf551
authored
Jun 24, 2016
by
Don Gagne
Committed by
GitHub
Jun 24, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make arming check ui less confusing (#3646)
parent
81837240
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
15 deletions
+46
-15
APMSafetyComponentCopter.qml
src/AutoPilotPlugins/APM/APMSafetyComponentCopter.qml
+17
-14
FactBitmask.qml
src/FactSystem/FactControls/FactBitmask.qml
+29
-1
No files found.
src/AutoPilotPlugins/APM/APMSafetyComponentCopter.qml
View file @
4adbf551
...
@@ -25,7 +25,7 @@ QGCView {
...
@@ -25,7 +25,7 @@ QGCView {
FactPanelController
{
id
:
controller
;
factPanel
:
panel
}
FactPanelController
{
id
:
controller
;
factPanel
:
panel
}
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
enabled
}
QGCPalette
{
id
:
ggcPal
;
colorGroupEnabled
:
enabled
}
property
Fact
_failsafeGCSEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_GCS_ENABLE
"
)
property
Fact
_failsafeGCSEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_GCS_ENABLE
"
)
property
Fact
_failsafeBattEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_BATT_ENABLE
"
)
property
Fact
_failsafeBattEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_BATT_ENABLE
"
)
...
@@ -83,7 +83,7 @@ QGCView {
...
@@ -83,7 +83,7 @@ QGCView {
id
:
failsafeSettings
id
:
failsafeSettings
width
:
throttleEnableCombo
.
x
+
throttleEnableCombo
.
width
+
_margins
width
:
throttleEnableCombo
.
x
+
throttleEnableCombo
.
width
+
_margins
height
:
mahField
.
y
+
mahField
.
height
+
_margins
height
:
mahField
.
y
+
mahField
.
height
+
_margins
color
:
palette
.
windowShade
color
:
ggcPal
.
windowShade
QGCLabel
{
QGCLabel
{
id
:
gcsEnableLabel
id
:
gcsEnableLabel
...
@@ -217,7 +217,7 @@ QGCView {
...
@@ -217,7 +217,7 @@ QGCView {
id
:
geoFenceSettings
id
:
geoFenceSettings
width
:
fenceAltMaxField
.
x
+
fenceAltMaxField
.
width
+
_margins
width
:
fenceAltMaxField
.
x
+
fenceAltMaxField
.
width
+
_margins
height
:
fenceAltMaxField
.
y
+
fenceAltMaxField
.
height
+
_margins
height
:
fenceAltMaxField
.
y
+
fenceAltMaxField
.
height
+
_margins
color
:
palette
.
windowShade
color
:
ggcPal
.
windowShade
QGCCheckBox
{
QGCCheckBox
{
id
:
circleGeo
id
:
circleGeo
...
@@ -341,7 +341,7 @@ QGCView {
...
@@ -341,7 +341,7 @@ QGCView {
id
:
rtlSettings
id
:
rtlSettings
width
:
rltAltFinalField
.
x
+
rltAltFinalField
.
width
+
_margins
width
:
rltAltFinalField
.
x
+
rltAltFinalField
.
width
+
_margins
height
:
rltAltFinalField
.
y
+
rltAltFinalField
.
height
+
_margins
height
:
rltAltFinalField
.
y
+
rltAltFinalField
.
height
+
_margins
color
:
palette
.
windowShade
color
:
ggcPal
.
windowShade
Image
{
Image
{
id
:
icon
id
:
icon
...
@@ -360,7 +360,7 @@ QGCView {
...
@@ -360,7 +360,7 @@ QGCView {
ColorOverlay
{
ColorOverlay
{
anchors.fill
:
icon
anchors.fill
:
icon
source
:
icon
source
:
icon
color
:
palette
.
text
color
:
ggcPal
.
text
visible
:
_showIcon
visible
:
_showIcon
}
}
...
@@ -472,7 +472,7 @@ QGCView {
...
@@ -472,7 +472,7 @@ QGCView {
Rectangle
{
Rectangle
{
width
:
flowLayout
.
width
width
:
flowLayout
.
width
height
:
armingCheckInnerColumn
.
height
+
(
_margins
*
2
)
height
:
armingCheckInnerColumn
.
height
+
(
_margins
*
2
)
color
:
palette
.
windowShade
color
:
ggcPal
.
windowShade
Column
{
Column
{
id
:
armingCheckInnerColumn
id
:
armingCheckInnerColumn
...
@@ -482,19 +482,22 @@ QGCView {
...
@@ -482,19 +482,22 @@ QGCView {
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
spacing
:
_margins
spacing
:
_margins
FactBitmask
{
id
:
armingCheckBitmask
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
firstEntryIsAll
:
true
fact
:
_armingCheck
}
QGCLabel
{
QGCLabel
{
id
:
armingCheckWarning
id
:
armingCheckWarning
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
wrapMode
:
Text
.
WordWrap
wrapMode
:
Text
.
WordWrap
text
:
qsTr
(
"
Turning off arming checks can lead to loss of Vehicle control.
"
)
color
:
qgcPal
.
warningText
}
text
:
qsTr
(
"
Warning: Turning off arming checks can lead to loss of Vehicle control.
"
)
visible
:
_armingCheck
.
value
!=
1
FactBitmask
{
id
:
armingCheckBitmask
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
fact
:
_armingCheck
}
}
}
}
}
// Rectangle - Arming checks
}
// Rectangle - Arming checks
...
...
src/FactSystem/FactControls/FactBitmask.qml
View file @
4adbf551
...
@@ -9,19 +9,47 @@ import QGroundControl.ScreenTools 1.0
...
@@ -9,19 +9,47 @@ import QGroundControl.ScreenTools 1.0
Flow
{
Flow
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
spacing
:
ScreenTools
.
defaultFontPixelWidth
/// true: Checking the first entry will clear and disable all other entries
property
bool
firstEntryIsAll
:
false
property
Fact
fact
:
Fact
{
}
property
Fact
fact
:
Fact
{
}
Component.onCompleted
:
{
if
(
firstEntryIsAll
&&
repeater
.
itemAt
(
0
).
checked
)
{
for
(
var
i
=
1
;
i
<
repeater
.
count
;
i
++
)
{
var
otherCheckbox
=
repeater
.
itemAt
(
i
)
otherCheckbox
.
enabled
=
false
}
}
}
Repeater
{
Repeater
{
model
:
fact
.
bitmaskStrings
id
:
repeater
model
:
fact
.
bitmaskStrings
QGCCheckBox
{
QGCCheckBox
{
id
:
checkbox
text
:
modelData
text
:
modelData
checked
:
fact
.
value
&
fact
.
bitmaskValues
[
index
]
checked
:
fact
.
value
&
fact
.
bitmaskValues
[
index
]
onClicked
:
{
onClicked
:
{
if
(
checked
)
{
if
(
checked
)
{
if
(
firstEntryIsAll
&&
index
==
0
)
{
for
(
var
i
=
1
;
i
<
repeater
.
count
;
i
++
)
{
var
otherCheckbox
=
repeater
.
itemAt
(
i
)
fact
.
value
&=
~
fact
.
bitmaskValues
[
i
]
otherCheckbox
.
checked
=
false
otherCheckbox
.
enabled
=
false
}
}
fact
.
value
|=
fact
.
bitmaskValues
[
index
]
fact
.
value
|=
fact
.
bitmaskValues
[
index
]
}
else
{
}
else
{
if
(
firstEntryIsAll
&&
index
==
0
)
{
for
(
var
i
=
1
;
i
<
repeater
.
count
;
i
++
)
{
var
otherCheckbox
=
repeater
.
itemAt
(
i
)
otherCheckbox
.
enabled
=
true
}
}
fact
.
value
&=
~
fact
.
bitmaskValues
[
index
]
fact
.
value
&=
~
fact
.
bitmaskValues
[
index
]
}
}
}
}
...
...
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