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
27fc129b
Commit
27fc129b
authored
Mar 13, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
User SliderSwitch for guided mode confirmations
parent
af5c7492
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
12 deletions
+36
-12
FlightDisplayViewWidgets.qml
src/FlightDisplay/FlightDisplayViewWidgets.qml
+36
-12
No files found.
src/FlightDisplay/FlightDisplayViewWidgets.qml
View file @
27fc129b
...
...
@@ -271,8 +271,8 @@ Item {
anchors.margins
:
_margins
anchors.bottom
:
parent
.
bottom
anchors.horizontalCenter
:
parent
.
horizontalCenter
width
:
(
guidedModeButtons
.
visible
?
guidedModeButtons
.
width
:
guidedModeConfirm
.
width
)
+
(
_margins
*
2
)
height
:
(
guidedModeButtons
.
visible
?
guidedModeButtons
.
height
:
guidedModeConfirm
.
height
)
+
(
_margins
*
2
)
width
:
guidedModeButtons
.
width
+
(
_margins
*
2
)
height
:
guidedModeButtons
.
height
+
(
_margins
*
2
)
color
:
qgcPal
.
window
visible
:
_activeVehicle
opacity
:
0.9
...
...
@@ -288,7 +288,6 @@ Item {
readonly
property
int
confirmGoTo
:
8
property
int
confirmActionCode
property
string
confirmText
function
actionConfirmed
()
{
switch
(
confirmActionCode
)
{
...
...
@@ -331,32 +330,32 @@ Item {
confirmActionCode
=
actionCode
switch
(
confirmActionCode
)
{
case
confirmArm
:
_guidedModeBar
.
confirmText
=
"
arm
"
guidedModeConfirm
.
confirmText
=
"
arm
"
break
;
case
confirmDisarm
:
_guidedModeBar
.
confirmText
=
"
disarm
"
guidedModeConfirm
.
confirmText
=
"
disarm
"
break
;
case
confirmEmergencyStop
:
_guidedModeBar
.
confirmText
=
"
emergency stop
"
guidedModeConfirm
.
confirmText
=
"
STOP ALL MOTORS!
"
break
;
case
confirmTakeoff
:
altitudeSlider
.
visible
=
true
altitudeSlider
.
setInitialValueMeters
(
10
)
_guidedModeBar
.
confirmText
=
"
takeoff
"
guidedModeConfirm
.
confirmText
=
"
takeoff
"
break
;
case
confirmLand
:
_guidedModeBar
.
confirmText
=
"
land
"
guidedModeConfirm
.
confirmText
=
"
land
"
break
;
case
confirmChangeAlt
:
altitudeSlider
.
visible
=
true
altitudeSlider
.
setInitialValueAppSettingsDistanceUnits
(
_activeVehicle
.
altitudeAMSL
.
value
)
_guidedModeBar
.
confirmText
=
"
altitude chang
e
"
guidedModeConfirm
.
confirmText
=
"
change altitud
e
"
break
;
case
confirmGoTo
:
_guidedModeBar
.
confirmText
=
"
mov
e
"
guidedModeConfirm
.
confirmText
=
"
move vehicl
e
"
break
;
}
guidedModeB
uttons
.
visible
=
false
guidedModeB
ar
.
visible
=
false
guidedModeConfirm
.
visible
=
true
}
...
...
@@ -397,6 +396,7 @@ Item {
}
}
/*
Row {
id: guidedModeConfirm
anchors.margins: _margins
...
...
@@ -429,8 +429,32 @@ Item {
_flightMap._gotoHereCoordinate = QtPositioning.coordinate()
}
}
}*/
}
// Rectangle - Guided mode buttons
// Action confirmation control
SliderSwitch
{
id
:
guidedModeConfirm
anchors.top
:
_guidedModeBar
.
top
anchors.bottom
:
_guidedModeBar
.
bottom
anchors.horizontalCenter
:
parent
.
horizontalCenter
visible
:
false
z
:
QGroundControl
.
zOrderWidgets
onAccept
:
{
guidedModeConfirm
.
visible
=
false
guidedModeBar
.
visible
=
true
_guidedModeBar
.
actionConfirmed
()
altitudeSlider
.
visible
=
false
}
}
// Column - Vertical tool buttons
onReject
:
{
guidedModeConfirm
.
visible
=
false
guidedModeBar
.
visible
=
true
altitudeSlider
.
visible
=
false
_flightMap
.
_gotoHereCoordinate
=
QtPositioning
.
coordinate
()
}
}
//-- Altitude slider
Rectangle
{
...
...
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