|
|
@ -35,6 +35,7 @@ Item { |
|
|
|
|
|
|
|
|
|
|
|
readonly property string emergencyStopTitle: qsTr("EMERGENCY STOP") |
|
|
|
readonly property string emergencyStopTitle: qsTr("EMERGENCY STOP") |
|
|
|
readonly property string armTitle: qsTr("Arm") |
|
|
|
readonly property string armTitle: qsTr("Arm") |
|
|
|
|
|
|
|
readonly property string forceArmTitle: qsTr("Force Arm") |
|
|
|
readonly property string disarmTitle: qsTr("Disarm") |
|
|
|
readonly property string disarmTitle: qsTr("Disarm") |
|
|
|
readonly property string rtlTitle: qsTr("Return") |
|
|
|
readonly property string rtlTitle: qsTr("Return") |
|
|
|
readonly property string takeoffTitle: qsTr("Takeoff") |
|
|
|
readonly property string takeoffTitle: qsTr("Takeoff") |
|
|
@ -55,6 +56,7 @@ Item { |
|
|
|
readonly property string actionListTitle: qsTr("Action") |
|
|
|
readonly property string actionListTitle: qsTr("Action") |
|
|
|
|
|
|
|
|
|
|
|
readonly property string armMessage: qsTr("Arm the vehicle.") |
|
|
|
readonly property string armMessage: qsTr("Arm the vehicle.") |
|
|
|
|
|
|
|
readonly property string forceArmMessage: qsTr("WARNING: This will force arming of the vehicle bypassing any safety checks.") |
|
|
|
readonly property string disarmMessage: qsTr("Disarm the vehicle") |
|
|
|
readonly property string disarmMessage: qsTr("Disarm the vehicle") |
|
|
|
readonly property string emergencyStopMessage: qsTr("WARNING: THIS WILL STOP ALL MOTORS. IF VEHICLE IS CURRENTLY IN THE AIR IT WILL CRASH.") |
|
|
|
readonly property string emergencyStopMessage: qsTr("WARNING: THIS WILL STOP ALL MOTORS. IF VEHICLE IS CURRENTLY IN THE AIR IT WILL CRASH.") |
|
|
|
readonly property string takeoffMessage: qsTr("Takeoff from ground and hold position.") |
|
|
|
readonly property string takeoffMessage: qsTr("Takeoff from ground and hold position.") |
|
|
@ -97,6 +99,7 @@ Item { |
|
|
|
readonly property int actionVtolTransitionToMRFlight: 21 |
|
|
|
readonly property int actionVtolTransitionToMRFlight: 21 |
|
|
|
readonly property int actionROI: 22 |
|
|
|
readonly property int actionROI: 22 |
|
|
|
readonly property int actionActionList: 23 |
|
|
|
readonly property int actionActionList: 23 |
|
|
|
|
|
|
|
readonly property int actionForceArm: 24 |
|
|
|
|
|
|
|
|
|
|
|
property bool _useChecklist: QGroundControl.settingsManager.appSettings.useChecklist.rawValue && QGroundControl.corePlugin.options.preFlightChecklistUrl.toString().length |
|
|
|
property bool _useChecklist: QGroundControl.settingsManager.appSettings.useChecklist.rawValue && QGroundControl.corePlugin.options.preFlightChecklistUrl.toString().length |
|
|
|
property bool _enforceChecklist: _useChecklist && QGroundControl.settingsManager.appSettings.enforceChecklist.rawValue |
|
|
|
property bool _enforceChecklist: _useChecklist && QGroundControl.settingsManager.appSettings.enforceChecklist.rawValue |
|
|
@ -104,6 +107,7 @@ Item { |
|
|
|
|
|
|
|
|
|
|
|
property bool showEmergenyStop: _guidedActionsEnabled && !_hideEmergenyStop && _vehicleArmed && _vehicleFlying |
|
|
|
property bool showEmergenyStop: _guidedActionsEnabled && !_hideEmergenyStop && _vehicleArmed && _vehicleFlying |
|
|
|
property bool showArm: _guidedActionsEnabled && !_vehicleArmed && _canArm |
|
|
|
property bool showArm: _guidedActionsEnabled && !_vehicleArmed && _canArm |
|
|
|
|
|
|
|
property bool showForceArm: _guidedActionsEnabled && !_vehicleArmed |
|
|
|
property bool showDisarm: _guidedActionsEnabled && _vehicleArmed && !_vehicleFlying |
|
|
|
property bool showDisarm: _guidedActionsEnabled && _vehicleArmed && !_vehicleFlying |
|
|
|
property bool showRTL: _guidedActionsEnabled && _vehicleArmed && activeVehicle.guidedModeSupported && _vehicleFlying && !_vehicleInRTLMode |
|
|
|
property bool showRTL: _guidedActionsEnabled && _vehicleArmed && activeVehicle.guidedModeSupported && _vehicleFlying && !_vehicleInRTLMode |
|
|
|
property bool showTakeoff: _guidedActionsEnabled && activeVehicle.takeoffVehicleSupported && !_vehicleFlying && _canArm |
|
|
|
property bool showTakeoff: _guidedActionsEnabled && activeVehicle.takeoffVehicleSupported && !_vehicleFlying && _canArm |
|
|
@ -274,6 +278,7 @@ Item { |
|
|
|
Connections { |
|
|
|
Connections { |
|
|
|
target: mainWindow |
|
|
|
target: mainWindow |
|
|
|
onArmVehicleRequest: armVehicleRequest() |
|
|
|
onArmVehicleRequest: armVehicleRequest() |
|
|
|
|
|
|
|
onForceArmVehicleRequest: forceArmVehicleRequest() |
|
|
|
onDisarmVehicleRequest: disarmVehicleRequest() |
|
|
|
onDisarmVehicleRequest: disarmVehicleRequest() |
|
|
|
onVtolTransitionToFwdFlightRequest: vtolTransitionToFwdFlightRequest() |
|
|
|
onVtolTransitionToFwdFlightRequest: vtolTransitionToFwdFlightRequest() |
|
|
|
onVtolTransitionToMRFlightRequest: vtolTransitionToMRFlightRequest() |
|
|
|
onVtolTransitionToMRFlightRequest: vtolTransitionToMRFlightRequest() |
|
|
@ -283,6 +288,10 @@ Item { |
|
|
|
confirmAction(actionArm) |
|
|
|
confirmAction(actionArm) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function forceArmVehicleRequest() { |
|
|
|
|
|
|
|
confirmAction(actionForceArm) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function disarmVehicleRequest() { |
|
|
|
function disarmVehicleRequest() { |
|
|
|
if (showEmergenyStop) { |
|
|
|
if (showEmergenyStop) { |
|
|
|
confirmAction(actionEmergencyStop) |
|
|
|
confirmAction(actionEmergencyStop) |
|
|
@ -325,6 +334,11 @@ Item { |
|
|
|
confirmDialog.message = armMessage |
|
|
|
confirmDialog.message = armMessage |
|
|
|
confirmDialog.hideTrigger = Qt.binding(function() { return !showArm }) |
|
|
|
confirmDialog.hideTrigger = Qt.binding(function() { return !showArm }) |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case actionForceArm: |
|
|
|
|
|
|
|
confirmDialog.title = forceArmTitle |
|
|
|
|
|
|
|
confirmDialog.message = forceArmMessage |
|
|
|
|
|
|
|
confirmDialog.hideTrigger = Qt.binding(function() { return !showForceArm }) |
|
|
|
|
|
|
|
break; |
|
|
|
case actionDisarm: |
|
|
|
case actionDisarm: |
|
|
|
if (_vehicleFlying) { |
|
|
|
if (_vehicleFlying) { |
|
|
|
return |
|
|
|
return |
|
|
@ -480,6 +494,9 @@ Item { |
|
|
|
case actionArm: |
|
|
|
case actionArm: |
|
|
|
activeVehicle.armed = true |
|
|
|
activeVehicle.armed = true |
|
|
|
break |
|
|
|
break |
|
|
|
|
|
|
|
case actionForceArm: |
|
|
|
|
|
|
|
activeVehicle.forceArm() |
|
|
|
|
|
|
|
break |
|
|
|
case actionDisarm: |
|
|
|
case actionDisarm: |
|
|
|
activeVehicle.armed = false |
|
|
|
activeVehicle.armed = false |
|
|
|
break |
|
|
|
break |
|
|
|