Commit 64ead8f0 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #5237 from DonLakeFlyer/PlanFixes

Plan fixes
parents d468da3e 452d88a7
......@@ -148,7 +148,7 @@ QGCView {
}
} else {
if (promptForMissionRemove && (_missionController.containsItems || _geoFenceController.containsItems || _rallyPointController.containsItems)) {
root.showDialog(removeMissionDialogComponent, qsTr("Flight complete"), showDialogDefaultWidth, StandardButton.No | StandardButton.Yes)
root.showDialog(missionCompleteDialogComponent, qsTr("Flight Plan complete"), showDialogDefaultWidth, StandardButton.Close)
}
promptForMissionRemove = false
}
......@@ -161,14 +161,35 @@ QGCView {
}
Component {
id: removeMissionDialogComponent
id: missionCompleteDialogComponent
QGCViewMessage {
message: qsTr("Do you want to remove the mission from the vehicle?")
QGCViewDialog {
QGCFlickable {
anchors.fill: parent
contentHeight: column.height
Column {
id: column
anchors.margins: _margins
anchors.left: parent.left
anchors.right: parent.right
spacing: ScreenTools.defaultFontPixelHeight
QGCLabel {
text: qsTr("%1 Images Taken").arg(_activeVehicle.cameraTriggerPoints.count)
anchors.horizontalCenter: parent.horizontalCenter
visible: _activeVehicle.cameraTriggerPoints.count != 0
}
function accept() {
_planMasterController.removeAllFromVehicle()
hideDialog()
QGCButton {
text: qsTr("Remove plan from vehicle")
anchors.horizontalCenter: parent.horizontalCenter
onClicked: {
_planMasterController.removeAllFromVehicle()
hideDialog()
}
}
}
}
}
}
......
......@@ -170,6 +170,8 @@ void MissionController::_newMissionItemsAvailableFromVehicle(bool removeAllReque
_deinitAllVisualItems();
_visualItems->deleteLater();
_settingsItem = NULL;
_visualItems = NULL;
_updateContainsItems(); // This will clear containsItems which will be set again below. This will re-pop Start Mission confirmation.
_visualItems = newControllerMissionItems;
if (!_controllerVehicle->firmwarePlugin()->sendHomePositionToVehicle() || _visualItems->count() == 0) {
......@@ -181,6 +183,7 @@ void MissionController::_newMissionItemsAvailableFromVehicle(bool removeAllReque
}
_initAllVisualItems();
_updateContainsItems();
emit newItemsFromVehicle();
}
_itemsRequested = false;
......
......@@ -949,16 +949,18 @@ int SurveyMissionItem::_appendWaypointToMission(QList<MissionItem*>& items, int
item = new MissionItem(seqNum++,
MAV_CMD_IMAGE_START_CAPTURE,
MAV_FRAME_MISSION,
0, // Interval
1, // Take 1 photo
-1, // Mav resolution
0, 0, // Param 4-5 unused
0, // Camera ID
7, // Param 7 unused
true, // autoContinue
false, // isCurrentItem
0, // Camera ID, all cameras
0, // Interval (none)
1, // Take 1 photo
-1, // Max horizontal resolution
-1, // Max vertical resolution
0, 0, // param 6-7 not used
true, // autoContinue
false, // isCurrentItem
missionItemParent);
items.append(item);
#if 0
// This generates too many commands. Pulling out for now, to see if image quality is still high enough.
item = new MissionItem(seqNum++,
MAV_CMD_NAV_DELAY,
MAV_FRAME_MISSION,
......@@ -969,6 +971,7 @@ int SurveyMissionItem::_appendWaypointToMission(QList<MissionItem*>& items, int
false, // isCurrentItem
missionItemParent);
items.append(item);
#endif
default:
break;
}
......
......@@ -281,6 +281,7 @@ Rectangle {
text: _controllerDirty ? qsTr("Upload Required") : qsTr("Upload")
enabled: !_controllerSyncInProgress
visible: !_controllerOffline
primary: _controllerDirty
onClicked: planMasterController.upload()
PropertyAnimation on opacity {
......
......@@ -364,11 +364,11 @@ Rectangle {
Item { Layout.fillWidth: true }
QGCLabel {
Layout.preferredWidth: _root._fieldWidth
text: qsTr("Frontal")
text: qsTr("Front Lap")
}
QGCLabel {
Layout.preferredWidth: _root._fieldWidth
text: qsTr("Side")
text: qsTr("Side Lap")
}
}
......
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