|
|
|
@ -295,6 +295,7 @@ FlightMap {
@@ -295,6 +295,7 @@ FlightMap {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// GoTo Location visuals |
|
|
|
|
MapQuickItem { |
|
|
|
|
id: gotoLocationItem |
|
|
|
|
visible: false |
|
|
|
@ -308,6 +309,22 @@ FlightMap {
@@ -308,6 +309,22 @@ FlightMap {
|
|
|
|
|
label: qsTr("Goto here", "Goto here waypoint") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
property bool inGotoFlightMode: _activeVehicle ? _activeVehicle.flightMode === _activeVehicle.gotoFlightMode : false |
|
|
|
|
property var activeVehicle: _activeVehicle |
|
|
|
|
|
|
|
|
|
onInGotoFlightModeChanged: { |
|
|
|
|
if (!inGotoFlightMode && visible) { |
|
|
|
|
// Hide goto indicator when vehicle falls out of guided mode |
|
|
|
|
visible = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
onActiveVehicleChanged: { |
|
|
|
|
if (!_activeVehicle) { |
|
|
|
|
visible = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function show(coord) { |
|
|
|
|
gotoLocationItem.coordinate = coord |
|
|
|
|
gotoLocationItem.visible = true |
|
|
|
@ -316,10 +333,17 @@ FlightMap {
@@ -316,10 +333,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 |
|
|
|
@ -328,9 +352,16 @@ FlightMap {
@@ -328,9 +352,16 @@ FlightMap {
|
|
|
|
|
|
|
|
|
|
property alias center: _mapCircle.center |
|
|
|
|
property alias clockwiseRotation: _mapCircle.clockwiseRotation |
|
|
|
|
property var activeVehicle: _activeVehicle |
|
|
|
|
|
|
|
|
|
readonly property real defaultRadius: 30 |
|
|
|
|
|
|
|
|
|
onActiveVehicleChanged: { |
|
|
|
|
if (!_activeVehicle) { |
|
|
|
|
visible = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function show(coord) { |
|
|
|
|
_mapCircle.radius.rawValue = defaultRadius |
|
|
|
|
orbitMapCircle.center = coord |
|
|
|
@ -341,6 +372,15 @@ FlightMap {
@@ -341,6 +372,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 +397,6 @@ FlightMap {
@@ -357,7 +397,6 @@ FlightMap {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Orbit telemetry visuals |
|
|
|
|
|
|
|
|
|
QGCMapCircleVisuals { |
|
|
|
|
id: orbitTelemetryCircle |
|
|
|
|
mapControl: parent |
|
|
|
@ -395,7 +434,7 @@ FlightMap {
@@ -395,7 +434,7 @@ FlightMap {
|
|
|
|
|
onTriggered: { |
|
|
|
|
gotoLocationItem.show(clickMenu.coord) |
|
|
|
|
orbitMapCircle.hide() |
|
|
|
|
guidedActionsController.confirmAction(guidedActionsController.actionGoto, clickMenu.coord) |
|
|
|
|
guidedActionsController.confirmAction(guidedActionsController.actionGoto, clickMenu.coord, gotoLocationItem) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -406,7 +445,7 @@ FlightMap {
@@ -406,7 +445,7 @@ FlightMap {
|
|
|
|
|
onTriggered: { |
|
|
|
|
orbitMapCircle.show(clickMenu.coord) |
|
|
|
|
gotoLocationItem.hide() |
|
|
|
|
guidedActionsController.confirmAction(guidedActionsController.actionOrbit, clickMenu.coord) |
|
|
|
|
guidedActionsController.confirmAction(guidedActionsController.actionOrbit, clickMenu.coord, orbitMapCircle) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|