Commit cafd9e03 authored by Valentin Platzgummer's avatar Valentin Platzgummer

merged with remote master

parents e46e65e1 ea04fc44
......@@ -512,6 +512,22 @@ QGCView {
FlightDisplayViewWidgets {
id: flightDisplayViewWidgets
<<<<<<< HEAD
=======
z: _panel.z + 4
height: ScreenTools.availableHeight - (singleMultiSelector.visible ? singleMultiSelector.height + _margins : 0)
anchors.left: parent.left
anchors.right: altitudeSlider.visible ? altitudeSlider.left : parent.right
anchors.bottom: parent.bottom
qgcView: root
useLightColors: isBackgroundDark
missionController: _missionController
visible: singleVehicleView.checked && !QGroundControl.videoManager.fullScreen
}
FlightDisplayWimaMenu {
id: wimaMenu
>>>>>>> ea04fc44a33fa7111877cdbdc2644ae4a9db9d2c
z: _panel.z + 4
height: ScreenTools.availableHeight - (singleMultiSelector.visible ? singleMultiSelector.height + _margins : 0)
anchors.left: parent.left
......
......@@ -151,6 +151,11 @@ Rectangle {
spacing: _margin
visible: transectsHeader.checked
QGCButton {
text: qsTr("Reset Reference")
onClicked: missionItem.resetReference();
}
QGCButton {
text: qsTr("Rotate Entry Point")
onClicked: missionItem.rotateEntryPoint();
......
......@@ -34,13 +34,17 @@ CircularSurveyComplexItem::CircularSurveyComplexItem(Vehicle *vehicle, bool flyV
}
void CircularSurveyComplexItem::resetReference()
{
setRefPoint(_surveyAreaPolygon.center());
}
void CircularSurveyComplexItem::setRefPoint(const QGeoCoordinate &refPt)
{
if (refPt != _referencePoint){
_referencePoint = refPt;
emit refPointChanged();
//qDebug() << _referencePoint.toString();
}
}
......
......@@ -24,6 +24,8 @@ public:
Q_PROPERTY(Fact* transectMinLength READ transectMinLength CONSTANT)
Q_PROPERTY(bool autoGenerated READ autoGenerated NOTIFY autoGeneratedChanged)
Q_INVOKABLE void resetReference(void);
// Property setters
void setRefPoint(const QGeoCoordinate &refPt);
// Set this to true if survey was automatically generated, prevents initialisation from gui.
......
......@@ -343,9 +343,15 @@ void WimaController::containerDataValidChanged(bool valid)
_missionController->insertSimpleMissionItem(*missionItem, missionControllerVisualItems->count());
if ( missionItem->command() == MAV_CMD_NAV_VTOL_LAND
<<<<<<< HEAD
|| missionItem->command() == MAV_CMD_NAV_LAND)
break;
=======
|| missionItem->command() == MAV_CMD_NAV_LAND)
_missionController->insertSimpleMissionItem(*missionItem, missionControllerVisualItems->count());
break;
>>>>>>> ea04fc44a33fa7111877cdbdc2644ae4a9db9d2c
}
......@@ -392,9 +398,14 @@ void WimaController::containerDataValidChanged(bool valid)
void WimaController::updateCurrentMissionItems()
{
<<<<<<< HEAD
if (_missionItems.count() < 1 || !_localPlanDataValid)
return;
=======
if (_missionItems.count() < 0 || !_localPlanDataValid)
return;
>>>>>>> ea04fc44a33fa7111877cdbdc2644ae4a9db9d2c
int numberWaypoints = 30; // the number of waypoints currentMissionItems must not exceed
int overlapping = 2; // number of overlapping waypoints of consecutive mission phases
......
......@@ -100,6 +100,7 @@ void WimaPlaner::removeArea(int index)
if (_visualItems.count() == 0) {
// this branch is reached if all items are removed
// to guarentee proper behavior, _currentAreaIndex must be set to a invalid value, as on constructor init.
resetAllInteractive();
_currentAreaIndex = -1;
return;
}
......
......@@ -172,11 +172,19 @@ Item {
DragCoordinate {
map: _root.map
qgcView: _root.qgcView
z: QGroundControl.zOrderMapItems
z: QGroundControl.zOrderMapItems
checked: _missionItem.isCurrentItem
coordinate: _missionItem.refPoint
onCoordinateChanged: _missionItem.refPoint = coordinate
property var refPoint: _missionItem.refPoint
onCoordinateChanged: _missionItem.refPoint = coordinate
onRefPointChanged: {
if (refPoint !== coordinate) {
coordinate = refPoint
}
}
onClicked: _root.clicked(_missionItem.sequenceNumber)
}
}
......
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