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
e48bf87f
Commit
e48bf87f
authored
Dec 28, 2018
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
a5db2eef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
16 deletions
+21
-16
GuidedActionConfirm.qml
src/FlightDisplay/GuidedActionConfirm.qml
+19
-14
GuidedActionsController.qml
src/FlightDisplay/GuidedActionsController.qml
+2
-2
No files found.
src/FlightDisplay/GuidedActionConfirm.qml
View file @
e48bf87f
...
...
@@ -34,16 +34,14 @@ Rectangle {
property
int
action
property
var
actionData
property
bool
hideTrigger
:
false
property
var
mapIndicator
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
property
bool
_emergencyAction
:
action
===
guidedController
.
actionEmergencyStop
onHideTriggerChanged
:
{
if
(
hideTrigger
)
{
hideTrigger
=
false
altitudeSlider
.
visible
=
false
visibleTimer
.
stop
()
visible
=
false
confirmCancelled
()
}
}
...
...
@@ -57,6 +55,17 @@ Rectangle {
}
}
function
confirmCancelled
()
{
altitudeSlider
.
visible
=
false
visible
=
false
hideTrigger
=
false
visibleTimer
.
stop
()
if
(
mapIndicator
)
{
mapIndicator
.
actionCancelled
()
mapIndicator
=
undefined
}
}
Timer
{
id
:
visibleTimer
interval
:
1000
...
...
@@ -107,12 +116,10 @@ Rectangle {
}
hideTrigger
=
false
guidedController
.
executeAction
(
_root
.
action
,
_root
.
actionData
,
altitudeChange
)
}
onReject
:
{
altitudeSlider
.
visible
=
false
_root
.
visible
=
false
hideTrigger
=
false
if
(
mapIndicator
)
{
mapIndicator
.
actionConfirmed
()
mapIndicator
=
undefined
}
}
}
}
...
...
@@ -127,12 +134,10 @@ Rectangle {
source
:
"
/res/XDelete.svg
"
fillMode
:
Image
.
PreserveAspectFit
color
:
qgcPal
.
text
QGCMouseArea
{
fillItem
:
parent
onClicked
:
{
altitudeSlider
.
visible
=
false
_root
.
visible
=
false
}
onClicked
:
confirmCancelled
()
}
}
}
src/FlightDisplay/GuidedActionsController.qml
View file @
e48bf87f
...
...
@@ -209,12 +209,13 @@ Item {
}
// Called when an action is about to be executed in order to confirm
function
confirmAction
(
actionCode
,
actionData
)
{
function
confirmAction
(
actionCode
,
actionData
,
mapIndicator
)
{
var
showImmediate
=
true
closeAll
()
confirmDialog
.
action
=
actionCode
confirmDialog
.
actionData
=
actionData
confirmDialog
.
hideTrigger
=
true
confirmDialog
.
mapIndicator
=
mapIndicator
_actionData
=
actionData
switch
(
actionCode
)
{
case
actionArm
:
...
...
@@ -385,7 +386,6 @@ Item {
break
case
actionOrbit
:
_activeVehicle
.
guidedModeOrbit
(
orbitMapCircle
.
center
,
orbitMapCircle
.
radius
()
*
(
orbitMapCircle
.
clockwiseRotation
?
1
:
-
1
),
_activeVehicle
.
altitudeAMSL
.
rawValue
+
actionAltitudeChange
)
orbitMapCircle
.
hide
()
break
case
actionLandAbort
:
_activeVehicle
.
abortLanding
(
50
)
// hardcoded value for climbOutAltitude that is currently ignored
...
...
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