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
f5372ca1
Commit
f5372ca1
authored
Apr 12, 2017
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show remove mission from vehicle even if on Video
parent
1cf09f40
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
63 deletions
+67
-63
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+64
-9
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+3
-54
No files found.
src/FlightDisplay/FlightDisplayView.qml
View file @
f5372ca1
...
@@ -96,6 +96,16 @@ QGCView {
...
@@ -96,6 +96,16 @@ QGCView {
onResumeMissionReady
:
guidedActionsController
.
confirmAction
(
guidedActionsController
.
actionResumeMissionReady
)
onResumeMissionReady
:
guidedActionsController
.
confirmAction
(
guidedActionsController
.
actionResumeMissionReady
)
}
}
GeoFenceController
{
id
:
flyGeoFenceController
Component.onCompleted
:
start
(
false
/* editMode */
)
}
RallyPointController
{
id
:
flyRallyPointController
Component.onCompleted
:
start
(
false
/* editMode */
)
}
MessageDialog
{
MessageDialog
{
id
:
px4JoystickSupport
id
:
px4JoystickSupport
text
:
qsTr
(
"
Joystick support requires MAVLink MANUAL_CONTROL support.
"
)
+
text
:
qsTr
(
"
Joystick support requires MAVLink MANUAL_CONTROL support.
"
)
+
...
@@ -123,6 +133,49 @@ QGCView {
...
@@ -123,6 +133,49 @@ QGCView {
}
}
}
}
// The following code is used to track vehicle states such that we prompt to remove mission from vehicle when mission completes
property
bool
vehicleArmed
:
_activeVehicle
?
_activeVehicle
.
armed
:
true
// true here prevents pop up from showing during shutdown
property
bool
vehicleWasArmed
:
false
property
bool
vehicleInMissionFlightMode
:
_activeVehicle
?
(
_activeVehicle
.
flightMode
===
_activeVehicle
.
missionFlightMode
)
:
false
property
bool
promptForMissionRemove
:
false
onVehicleArmedChanged
:
{
if
(
vehicleArmed
)
{
if
(
!
promptForMissionRemove
)
{
promptForMissionRemove
=
vehicleInMissionFlightMode
vehicleWasArmed
=
true
}
}
else
{
if
(
promptForMissionRemove
&&
(
flyMissionController
.
containsItems
||
flyGeoFenceController
.
containsItems
||
flyRallyPointController
.
containsItems
))
{
root
.
showDialog
(
removeMissionDialogComponent
,
qsTr
(
"
Flight complete
"
),
showDialogDefaultWidth
,
StandardButton
.
No
|
StandardButton
.
Yes
)
}
promptForMissionRemove
=
false
}
}
onVehicleInMissionFlightModeChanged
:
{
if
(
!
promptForMissionRemove
&&
vehicleArmed
)
{
promptForMissionRemove
=
true
}
}
Component
{
id
:
removeMissionDialogComponent
QGCViewMessage
{
message
:
qsTr
(
"
Do you want to remove the mission from the vehicle?
"
)
function
accept
()
{
flyMissionController
.
removeAllFromVehicle
()
flyGeoFenceController
.
removeAllFromVehicle
()
flyRallyPointController
.
removeAllFromVehicle
()
hideDialog
()
}
}
}
QGCMapPalette
{
id
:
mapPal
;
lightColors
:
_mainIsMap
?
_flightMap
.
isSatelliteMap
:
true
}
QGCMapPalette
{
id
:
mapPal
;
lightColors
:
_mainIsMap
?
_flightMap
.
isSatelliteMap
:
true
}
QGCViewPanel
{
QGCViewPanel
{
...
@@ -160,6 +213,8 @@ QGCView {
...
@@ -160,6 +213,8 @@ QGCView {
id
:
_flightMap
id
:
_flightMap
anchors.fill
:
parent
anchors.fill
:
parent
missionController
:
flyMissionController
missionController
:
flyMissionController
geoFenceController
:
flyGeoFenceController
rallyPointController
:
flyRallyPointController
guidedActionsController
:
_guidedController
guidedActionsController
:
_guidedController
flightWidgets
:
flightDisplayViewWidgets
flightWidgets
:
flightDisplayViewWidgets
rightPanelWidth
:
ScreenTools
.
defaultFontPixelHeight
*
9
rightPanelWidth
:
ScreenTools
.
defaultFontPixelHeight
*
9
...
@@ -356,7 +411,7 @@ QGCView {
...
@@ -356,7 +411,7 @@ QGCView {
buttonVisible
:
[
_guidedController
.
showTakeoff
||
!
_guidedController
.
showLand
,
_guidedController
.
showLand
&&
!
_guidedController
.
showTakeoff
,
true
,
true
,
true
,
_guidedController
.
smartShotsAvailable
]
buttonVisible
:
[
_guidedController
.
showTakeoff
||
!
_guidedController
.
showLand
,
_guidedController
.
showLand
&&
!
_guidedController
.
showTakeoff
,
true
,
true
,
true
,
_guidedController
.
smartShotsAvailable
]
buttonEnabled
:
[
_guidedController
.
showTakeoff
,
_guidedController
.
showLand
,
_guidedController
.
showRTL
,
_guidedController
.
showPause
,
_anyActionAvailable
,
_anySmartShotAvailable
]
buttonEnabled
:
[
_guidedController
.
showTakeoff
,
_guidedController
.
showLand
,
_guidedController
.
showRTL
,
_guidedController
.
showPause
,
_anyActionAvailable
,
_anySmartShotAvailable
]
property
bool
_anyActionAvailable
:
_guidedController
.
show
EmergenyStop
||
_guidedController
.
show
StartMission
||
_guidedController
.
showResumeMission
||
_guidedController
.
showChangeAlt
||
_guidedController
.
showLandAbort
property
bool
_anyActionAvailable
:
_guidedController
.
showStartMission
||
_guidedController
.
showResumeMission
||
_guidedController
.
showChangeAlt
||
_guidedController
.
showLandAbort
property
bool
_anySmartShotAvailable
:
_guidedController
.
showOrbit
property
bool
_anySmartShotAvailable
:
_guidedController
.
showOrbit
property
var
_actionModel
:
[
property
var
_actionModel
:
[
{
{
...
...
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
f5372ca1
...
@@ -33,6 +33,8 @@ FlightMap {
...
@@ -33,6 +33,8 @@ FlightMap {
property
alias
scaleState
:
mapScale
.
state
property
alias
scaleState
:
mapScale
.
state
property
var
missionController
property
var
missionController
property
var
geoFenceController
property
var
rallyPointController
property
var
guidedActionsController
property
var
guidedActionsController
property
var
flightWidgets
property
var
flightWidgets
property
var
rightPanelWidth
property
var
rightPanelWidth
...
@@ -137,59 +139,6 @@ FlightMap {
...
@@ -137,59 +139,6 @@ FlightMap {
}
}
}
}
GeoFenceController
{
id
:
geoFenceController
Component.onCompleted
:
start
(
false
/* editMode */
)
}
RallyPointController
{
id
:
rallyPointController
Component.onCompleted
:
start
(
false
/* editMode */
)
}
// The following code is used to track vehicle states such that we prompt to remove mission from vehicle when mission completes
property
bool
vehicleArmed
:
_activeVehicle
?
_activeVehicle
.
armed
:
false
property
bool
vehicleWasArmed
:
false
property
bool
vehicleInMissionFlightMode
:
_activeVehicle
?
(
_activeVehicle
.
flightMode
===
_activeVehicle
.
missionFlightMode
)
:
false
property
bool
promptForMissionRemove
:
false
onVehicleArmedChanged
:
{
if
(
vehicleArmed
)
{
if
(
!
promptForMissionRemove
)
{
promptForMissionRemove
=
vehicleInMissionFlightMode
vehicleWasArmed
=
true
}
}
else
{
if
(
promptForMissionRemove
&&
(
missionController
.
containsItems
||
geoFenceController
.
containsItems
||
rallyPointController
.
containsItems
))
{
qgcView
.
showDialog
(
removeMissionDialogComponent
,
qsTr
(
"
Flight complete
"
),
showDialogDefaultWidth
,
StandardButton
.
No
|
StandardButton
.
Yes
)
}
promptForMissionRemove
=
false
}
}
onVehicleInMissionFlightModeChanged
:
{
if
(
!
promptForMissionRemove
&&
vehicleArmed
)
{
promptForMissionRemove
=
true
}
}
Component
{
id
:
removeMissionDialogComponent
QGCViewMessage
{
message
:
qsTr
(
"
Do you want to remove the mission from the vehicle?
"
)
function
accept
()
{
missionController
.
removeAllFromVehicle
()
geoFenceController
.
removeAllFromVehicle
()
rallyPointController
.
removeAllFromVehicle
()
hideDialog
()
}
}
}
ExclusiveGroup
{
ExclusiveGroup
{
id
:
_mapTypeButtonsExclusiveGroup
id
:
_mapTypeButtonsExclusiveGroup
}
}
...
@@ -239,7 +188,7 @@ FlightMap {
...
@@ -239,7 +188,7 @@ FlightMap {
delegate
:
MissionItemMapVisual
{
delegate
:
MissionItemMapVisual
{
map
:
flightMap
map
:
flightMap
onClicked
:
guidedActionsController
.
confirmAction
(
guidedActionsController
.
actionSetWaypoint
,
object
.
sequenceNumber
)
onClicked
:
guidedActionsController
.
confirmAction
(
guidedActionsController
.
actionSetWaypoint
,
Math
.
max
(
object
.
sequenceNumber
,
1
)
)
}
}
}
}
...
...
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