|
|
|
@ -295,6 +295,7 @@ FlightMap {
@@ -295,6 +295,7 @@ FlightMap {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// GoTo Location visuals |
|
|
|
|
MapQuickItem { |
|
|
|
|
id: gotoLocationItem |
|
|
|
|
visible: false |
|
|
|
@ -308,6 +309,15 @@ FlightMap {
@@ -308,6 +309,15 @@ FlightMap {
|
|
|
|
|
label: qsTr("Goto here", "Goto here waypoint") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
property bool inGotoFlightMode: _activeVehicle ? _activeVehicle.flightMode === _activeVehicle.gotoFlightMode : false |
|
|
|
|
|
|
|
|
|
onInGotoFlightModeChanged: { |
|
|
|
|
if (!inGotoFlightMode && visible) { |
|
|
|
|
// Hide goto indicator when vehicle falls out of guided mode |
|
|
|
|
visible = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function show(coord) { |
|
|
|
|
gotoLocationItem.coordinate = coord |
|
|
|
|
gotoLocationItem.visible = true |
|
|
|
@ -316,10 +326,17 @@ FlightMap {
@@ -316,10 +326,17 @@ FlightMap {
|
|
|
|
|
function hide() { |
|
|
|
|
gotoLocationItem.visible = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Orbit visuals |
|
|
|
|
function actionConfirmed() { |
|
|
|
|
// We leave the indicator visible. The handling for onInGuidedModeChanged will hide it. |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function actionCancelled() { |
|
|
|
|
hide() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Orbit editing visuals |
|
|
|
|
QGCMapCircleVisuals { |
|
|
|
|
id: orbitMapCircle |
|
|
|
|
mapControl: parent |
|
|
|
@ -341,6 +358,15 @@ FlightMap {
@@ -341,6 +358,15 @@ FlightMap {
|
|
|
|
|
orbitMapCircle.visible = false |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function actionConfirmed() { |
|
|
|
|
// Live orbit status is handled by telemetry so we hide here and telemetry will show again. |
|
|
|
|
hide() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function actionCancelled() { |
|
|
|
|
hide() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function radius() { |
|
|
|
|
return _mapCircle.radius.rawValue |
|
|
|
|
} |
|
|
|
@ -357,7 +383,6 @@ FlightMap {
@@ -357,7 +383,6 @@ FlightMap {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Orbit telemetry visuals |
|
|
|
|
|
|
|
|
|
QGCMapCircleVisuals { |
|
|
|
|
id: orbitTelemetryCircle |
|
|
|
|
mapControl: parent |
|
|
|
@ -395,7 +420,7 @@ FlightMap {
@@ -395,7 +420,7 @@ FlightMap {
|
|
|
|
|
onTriggered: { |
|
|
|
|
gotoLocationItem.show(clickMenu.coord) |
|
|
|
|
orbitMapCircle.hide() |
|
|
|
|
guidedActionsController.confirmAction(guidedActionsController.actionGoto, clickMenu.coord) |
|
|
|
|
guidedActionsController.confirmAction(guidedActionsController.actionGoto, clickMenu.coord, gotoLocationItem) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -406,7 +431,7 @@ FlightMap {
@@ -406,7 +431,7 @@ FlightMap {
|
|
|
|
|
onTriggered: { |
|
|
|
|
orbitMapCircle.show(clickMenu.coord) |
|
|
|
|
gotoLocationItem.hide() |
|
|
|
|
guidedActionsController.confirmAction(guidedActionsController.actionOrbit, clickMenu.coord) |
|
|
|
|
guidedActionsController.confirmAction(guidedActionsController.actionOrbit, clickMenu.coord, orbitMapCircle) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|