Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
4d868b9f
Commit
4d868b9f
authored
Apr 13, 2017
by
Don Gagne
Browse files
New user model for upload while active mission
parent
e2f3457b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/PlanView/PlanView.qml
View file @
4d868b9f
...
...
@@ -115,6 +115,40 @@ QGCView {
}
}
Component
{
id
:
activeMissionUploadDialogComponent
QGCViewDialog
{
Column
{
anchors.fill
:
parent
spacing
:
ScreenTools
.
defaultFontPixelHeight
QGCLabel
{
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
text
:
qsTr
(
"
Your vehicle is currently flying a mission. In order to upload a new or modified mission the current mission will be paused.
"
)
}
QGCLabel
{
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
text
:
qsTr
(
"
After the mission is uploaded you can adjust the current waypoint and start the mission.
"
)
}
QGCButton
{
text
:
qsTr
(
"
Pause and Upload
"
)
onClicked
:
{
_activeVehicle
.
flightMode
=
_activeVehicle
.
pauseFlightMode
missionController
.
sendToVehicle
()
toolbar
.
showFlyView
()
hideDialog
()
}
}
}
}
}
MissionController
{
id
:
missionController
...
...
@@ -127,7 +161,7 @@ QGCView {
function
_denyUpload
()
{
if
(
_activeVehicle
&&
_activeVehicle
.
armed
&&
_activeVehicle
.
flightMode
===
_activeVehicle
.
missionFlightMode
)
{
_qgcView
.
show
Message
(
qsTr
(
"
Mission
Upload
"
),
qsTr
(
"
Your vehicle is currently flying a m
ission
.
Upload
is not allowed.
"
)
,
StandardButton
.
Ok
)
_qgcView
.
show
Dialog
(
active
MissionUpload
DialogComponent
,
qsTr
(
"
M
ission Upload
"
),
_qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
)
return
true
}
else
{
return
false
...
...
@@ -137,7 +171,9 @@ QGCView {
// Users is switching away from Plan View
function
uploadOnSwitch
()
{
if
(
missionController
.
dirty
&&
_autoSync
)
{
if
(
!
_denyUpload
())
{
if
(
_denyUpload
())
{
return
false
}
else
{
sendToVehicle
()
}
}
...
...
@@ -145,9 +181,9 @@ QGCView {
}
function
upload
()
{
if
(
!
_denyUpload
())
{
sendToVehicle
()
}
if
(
!
_denyUpload
())
{
sendToVehicle
()
}
}
function
loadFromSelectedFile
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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