Commit 0690559b authored by DonLakeFlyer's avatar DonLakeFlyer

Add support for multi-vehicle variants

parent 98221f29
......@@ -64,6 +64,7 @@ Item {
readonly property string orbitMessage: qsTr("Orbit the vehicle around the current location.")
readonly property string landAbortMessage: qsTr("Abort the landing sequence.")
readonly property string pauseMessage: qsTr("Pause the vehicle at it's current position.")
readonly property string mvPauseMessage: qsTr("Pause all vehicles at their current position.")
readonly property int actionRTL: 1
readonly property int actionLand: 2
......@@ -81,6 +82,8 @@ Item {
readonly property int actionResumeMission: 14
readonly property int actionResumeMissionReady: 15
readonly property int actionPause: 16
readonly property int actionMVPause: 17
readonly property int actionMVStartMission: 18
property bool showEmergenyStop: !_hideEmergenyStop && _activeVehicle && _vehicleArmed && _vehicleFlying
property bool showArm: _activeVehicle && !_vehicleArmed
......@@ -195,6 +198,11 @@ Item {
confirmDialog.message = startMissionMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showStartMission })
break;
case actionMVStartMission:
confirmDialog.title = startMissionTitle
confirmDialog.message = startMissionMessage
confirmDialog.hideTrigger = true
break;
case actionContinueMission:
confirmDialog.title = continueMissionTitle
confirmDialog.message = continueMissionMessage
......@@ -251,6 +259,11 @@ Item {
confirmDialog.message = pauseMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showPause })
break;
case actionMVPause:
confirmDialog.title = pauseTitle
confirmDialog.message = mvPauseMessage
confirmDialog.hideTrigger = true
break;
default:
console.warn("Unknown actionCode", actionCode)
return
......@@ -281,6 +294,13 @@ Item {
case actionContinueMission:
_activeVehicle.startMission()
break
case actionMVStartMission:
var rgVehicle = QGroundControl.multiVehicleManager.vehicles
for (var i=0; i<rgVehicle.count; i++) {
var vehicle = rgVehicle.get(i)
vehicle.startMission()
}
break
case actionArm:
_activeVehicle.armed = true
break
......@@ -308,6 +328,13 @@ Item {
case actionPause:
_activeVehicle.pauseVehicle()
break
case actionMVPause:
var rgVehicle = QGroundControl.multiVehicleManager.vehicles
for (var i=0; i<rgVehicle.count; i++) {
var vehicle = rgVehicle.get(i)
vehicle.pauseVehicle()
}
break
default:
console.warn(qsTr("Internal error: unknown actionCode"), actionCode)
break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment