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
d4d715b6
Commit
d4d715b6
authored
Feb 12, 2018
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add delay to guided commands to catch up with multiple state changes
parent
e0d295ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
GuidedActionConfirm.qml
src/FlightDisplay/GuidedActionConfirm.qml
+18
-0
GuidedActionsController.qml
src/FlightDisplay/GuidedActionsController.qml
+6
-1
No files found.
src/FlightDisplay/GuidedActionConfirm.qml
View file @
d4d715b6
...
...
@@ -42,10 +42,28 @@ NoMouseThroughRectangle {
if
(
hideTrigger
)
{
hideTrigger
=
false
altitudeSlider
.
visible
=
false
visibleTimer
.
stop
()
visible
=
false
}
}
function
show
(
immediate
)
{
if
(
immediate
)
{
visible
=
true
}
else
{
// We delay showing the confirmation for a small amount in order to any other state
// changes to propogate through the system. This way only the final state shows up.
visibleTimer
.
restart
()
}
}
Timer
{
id
:
visibleTimer
interval
:
1000
repeat
:
false
onTriggered
:
visible
=
true
}
QGCPalette
{
id
:
qgcPal
}
Column
{
...
...
src/FlightDisplay/GuidedActionsController.qml
View file @
d4d715b6
...
...
@@ -185,9 +185,11 @@ Item {
// Called when an action is about to be executed in order to confirm
function
confirmAction
(
actionCode
,
actionData
)
{
var
showImmediate
=
true
closeAll
()
confirmDialog
.
action
=
actionCode
confirmDialog
.
actionData
=
actionData
confirmDialog
.
hideTrigger
=
true
_actionData
=
actionData
switch
(
actionCode
)
{
case
actionArm
:
...
...
@@ -219,6 +221,7 @@ Item {
altitudeSlider
.
visible
=
true
break
;
case
actionStartMission
:
showImmediate
=
false
confirmDialog
.
title
=
startMissionTitle
confirmDialog
.
message
=
startMissionMessage
confirmDialog
.
hideTrigger
=
Qt
.
binding
(
function
()
{
return
!
showStartMission
})
...
...
@@ -229,11 +232,13 @@ Item {
confirmDialog
.
hideTrigger
=
true
break
;
case
actionContinueMission
:
showImmediate
=
false
confirmDialog
.
title
=
continueMissionTitle
confirmDialog
.
message
=
continueMissionMessage
confirmDialog
.
hideTrigger
=
Qt
.
binding
(
function
()
{
return
!
showContinueMission
})
break
;
case
actionResumeMission
:
showImmediate
=
false
confirmDialog
.
title
=
resumeMissionTitle
confirmDialog
.
message
=
resumeMissionMessage
confirmDialog
.
hideTrigger
=
Qt
.
binding
(
function
()
{
return
!
showResumeMission
})
...
...
@@ -308,7 +313,7 @@ Item {
console
.
warn
(
"
Unknown actionCode
"
,
actionCode
)
return
}
confirmDialog
.
visible
=
true
confirmDialog
.
show
(
showImmediate
)
}
// Executes the specified action
...
...
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