Browse Source

Better handling of Flight Plan Complete comm lost scenarios

QGC4.4
Don Gagne 7 years ago
parent
commit
0b938f334e
  1. 112
      src/FlightDisplay/FlightDisplayView.qml

112
src/FlightDisplay/FlightDisplayView.qml

@ -163,6 +163,12 @@ QGCView {
id: missionCompleteDialogComponent id: missionCompleteDialogComponent
QGCViewDialog { QGCViewDialog {
property var activeVehicleCopy: _activeVehicle
onActiveVehicleCopyChanged:
if (!activeVehicleCopy) {
hideDialog()
}
QGCFlickable { QGCFlickable {
anchors.fill: parent anchors.fill: parent
contentHeight: column.height contentHeight: column.height
@ -172,62 +178,80 @@ QGCView {
anchors.margins: _margins anchors.margins: _margins
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
spacing: ScreenTools.defaultFontPixelHeight
QGCLabel { ColumnLayout {
Layout.fillWidth: true
text: qsTr("%1 Images Taken").arg(_activeVehicle.cameraTriggerPoints.count)
horizontalAlignment: Text.AlignHCenter
visible: _activeVehicle.cameraTriggerPoints.count != 0
}
QGCButton {
Layout.fillWidth: true Layout.fillWidth: true
text: qsTr("Remove plan from vehicle") spacing: ScreenTools.defaultFontPixelHeight
onClicked: { visible: !_activeVehicle.connectionLost || !_guidedController.showResumeMission
_planMasterController.removeAllFromVehicle()
hideDialog() QGCLabel {
Layout.fillWidth: true
text: qsTr("%1 Images Taken").arg(_activeVehicle.cameraTriggerPoints.count)
horizontalAlignment: Text.AlignHCenter
visible: _activeVehicle.cameraTriggerPoints.count != 0
} }
}
QGCButton { QGCButton {
Layout.fillWidth: true Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter text: qsTr("Remove plan from vehicle")
text: qsTr("Leave plan on vehicle") onClicked: {
onClicked: hideDialog() _planMasterController.removeAllFromVehicle()
} hideDialog()
}
}
Rectangle { QGCButton {
Layout.fillWidth: true Layout.fillWidth: true
color: qgcPal.text Layout.alignment: Qt.AlignHCenter
height: 1 text: qsTr("Leave plan on vehicle")
} onClicked: hideDialog()
}
QGCButton { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter color: qgcPal.text
text: qsTr("Resume Mission From Waypoint %1").arg(_guidedController._resumeMissionIndex) height: 1
visible: _guidedController.showResumeMission }
onClicked: { QGCButton {
guidedController.executeAction(_guidedController.actionResumeMission, null, null) Layout.fillWidth: true
hideDialog() Layout.alignment: Qt.AlignHCenter
text: qsTr("Resume Mission From Waypoint %1").arg(_guidedController._resumeMissionIndex)
visible: _guidedController.showResumeMission
onClicked: {
guidedController.executeAction(_guidedController.actionResumeMission, null, null)
hideDialog()
}
} }
}
QGCLabel { QGCLabel {
Layout.fillWidth: true Layout.fillWidth: true
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: qsTr("Resume Mission will rebuild the current mission from the last flown waypoint and upload it to the vehicle for the next flight.") text: qsTr("Resume Mission will rebuild the current mission from the last flown waypoint and upload it to the vehicle for the next flight.")
visible: _guidedController.showResumeMission visible: _guidedController.showResumeMission
}
QGCLabel {
Layout.fillWidth: true
wrapMode: Text.WordWrap
color: qgcPal.warningText
text: qsTr("If you are changing batteries for Resume Mission do not disconnect from the vehicle when communication is lost.")
visible: _guidedController.showResumeMission
}
} }
QGCLabel { ColumnLayout {
Layout.fillWidth: true Layout.fillWidth: true
wrapMode: Text.WordWrap spacing: ScreenTools.defaultFontPixelHeight
color: qgcPal.warningText visible: _activeVehicle.connectionLost && _guidedController.showResumeMission
text: qsTr("If you are changing batteries for Resume Mission do not disconnect from the vehicle when communication is lost.")
visible: _guidedController.showResumeMission QGCLabel {
Layout.fillWidth: true
wrapMode: Text.WordWrap
color: qgcPal.warningText
text: qsTr("If you are changing batteries for Resume Mission do not disconnect from the vehicle.")
}
} }
} }
} }

Loading…
Cancel
Save