|
|
|
@ -93,25 +93,26 @@ Item {
@@ -93,25 +93,26 @@ Item {
|
|
|
|
|
readonly property int actionVtolTransitionToFwdFlight: 20 |
|
|
|
|
readonly property int actionVtolTransitionToMRFlight: 21 |
|
|
|
|
|
|
|
|
|
property bool showEmergenyStop: !_hideEmergenyStop && _activeVehicle && _vehicleArmed && _vehicleFlying |
|
|
|
|
property bool showArm: _activeVehicle && !_vehicleArmed |
|
|
|
|
property bool showDisarm: _activeVehicle && _vehicleArmed && !_vehicleFlying |
|
|
|
|
property bool showRTL: _activeVehicle && _vehicleArmed && _activeVehicle.guidedModeSupported && _vehicleFlying && !_vehicleInRTLMode |
|
|
|
|
property bool showTakeoff: _activeVehicle && _activeVehicle.takeoffVehicleSupported && !_vehicleFlying |
|
|
|
|
property bool showLand: _activeVehicle && _activeVehicle.guidedModeSupported && _vehicleArmed && !_activeVehicle.fixedWing && !_vehicleInLandMode |
|
|
|
|
property bool showStartMission: _activeVehicle && _missionAvailable && !_missionActive && !_vehicleFlying |
|
|
|
|
property bool showContinueMission: _activeVehicle && _missionAvailable && !_missionActive && _vehicleFlying && (_currentMissionIndex < missionController.visualItems.count - 1) |
|
|
|
|
property bool showPause: _activeVehicle && _vehicleArmed && _activeVehicle.pauseVehicleSupported && _vehicleFlying && !_vehiclePaused |
|
|
|
|
property bool showChangeAlt: (_activeVehicle && _vehicleFlying) && _activeVehicle.guidedModeSupported && _vehicleArmed && !_missionActive |
|
|
|
|
property bool showOrbit: !_hideOrbit && _activeVehicle && _vehicleFlying && _activeVehicle.orbitModeSupported && _vehicleArmed && !_missionActive |
|
|
|
|
property bool showLandAbort: _activeVehicle && _vehicleFlying && _activeVehicle.fixedWing && _vehicleLanding |
|
|
|
|
property bool showGotoLocation: _activeVehicle && _vehicleFlying |
|
|
|
|
property bool showEmergenyStop: _guidedActionsEnabled && !_hideEmergenyStop && _vehicleArmed && _vehicleFlying |
|
|
|
|
property bool showArm: _guidedActionsEnabled && !_vehicleArmed |
|
|
|
|
property bool showDisarm: _guidedActionsEnabled && _vehicleArmed && !_vehicleFlying |
|
|
|
|
property bool showRTL: _guidedActionsEnabled && _vehicleArmed && _activeVehicle.guidedModeSupported && _vehicleFlying && !_vehicleInRTLMode |
|
|
|
|
property bool showTakeoff: _guidedActionsEnabled && _activeVehicle.takeoffVehicleSupported && !_vehicleFlying |
|
|
|
|
property bool showLand: _guidedActionsEnabled && _activeVehicle.guidedModeSupported && _vehicleArmed && !_activeVehicle.fixedWing && !_vehicleInLandMode |
|
|
|
|
property bool showStartMission: _guidedActionsEnabled && _missionAvailable && !_missionActive && !_vehicleFlying |
|
|
|
|
property bool showContinueMission: _guidedActionsEnabled && _missionAvailable && !_missionActive && _vehicleFlying && (_currentMissionIndex < missionController.visualItems.count - 1) |
|
|
|
|
property bool showPause: _guidedActionsEnabled && _vehicleArmed && _activeVehicle.pauseVehicleSupported && _vehicleFlying && !_vehiclePaused |
|
|
|
|
property bool showChangeAlt: _guidedActionsEnabled && _vehicleFlying && _activeVehicle.guidedModeSupported && _vehicleArmed && !_missionActive |
|
|
|
|
property bool showOrbit: _guidedActionsEnabled && !_hideOrbit && _vehicleFlying && _activeVehicle.orbitModeSupported && _vehicleArmed && !_missionActive |
|
|
|
|
property bool showLandAbort: _guidedActionsEnabled && _vehicleFlying && _activeVehicle.fixedWing && _vehicleLanding |
|
|
|
|
property bool showGotoLocation: _guidedActionsEnabled && _vehicleFlying |
|
|
|
|
|
|
|
|
|
// Note: The 'missionController.visualItems.count - 3' is a hack to not trigger resume mission when a mission ends with an RTL item |
|
|
|
|
property bool showResumeMission: _activeVehicle && !_vehicleArmed && _vehicleWasFlying && _missionAvailable && _resumeMissionIndex > 0 && (_resumeMissionIndex < missionController.visualItems.count - 3) |
|
|
|
|
|
|
|
|
|
property bool guidedUIVisible: guidedActionConfirm.visible || guidedActionList.visible |
|
|
|
|
|
|
|
|
|
property bool _guidedActionsEnabled: (QGroundControl.corePlugin.options.guidedActionsRequireRCRSSI && _activeVehicle) ? _rcRSSIAvailable : _activeVehicle |
|
|
|
|
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle |
|
|
|
|
property string _flightMode: _activeVehicle ? _activeVehicle.flightMode : "" |
|
|
|
|
property bool _missionAvailable: missionController.containsItems |
|
|
|
@ -128,6 +129,7 @@ Item {
@@ -128,6 +129,7 @@ Item {
|
|
|
|
|
property bool _hideEmergenyStop: !QGroundControl.corePlugin.options.guidedBarShowEmergencyStop |
|
|
|
|
property bool _hideOrbit: !QGroundControl.corePlugin.options.guidedBarShowOrbit |
|
|
|
|
property bool _vehicleWasFlying: false |
|
|
|
|
property bool _rcRSSIAvailable: _activeVehicle ? _activeVehicle.rcRSSI > 0 && _activeVehicle.rcRSSI < 255 : false |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
//Handy code for debugging state problems |
|
|
|
@ -193,7 +195,7 @@ Item {
@@ -193,7 +195,7 @@ Item {
|
|
|
|
|
_actionData = actionData |
|
|
|
|
switch (actionCode) { |
|
|
|
|
case actionArm: |
|
|
|
|
if (_vehicleFlying) { |
|
|
|
|
if (_vehicleFlying || !_guidedActionsEnabled) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
confirmDialog.title = armTitle |
|
|
|
|