Commit 827eddf3 authored by DonLakeFlyer's avatar DonLakeFlyer

Support for images in turnaround on/off

parent fe004f8b
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"shortDescription": "Specify the distance between each photo", "shortDescription": "Specify the distance between each photo",
"type": "double", "type": "double",
"units": "m", "units": "m",
"min": 0, "min": 0.1,
"decimalPlaces": 1, "decimalPlaces": 1,
"defaultValue": 1 "defaultValue": 1
}, },
......
...@@ -229,36 +229,40 @@ bool CameraSection::scanForCameraSection(QmlObjectListModel* visualItems, int sc ...@@ -229,36 +229,40 @@ bool CameraSection::scanForCameraSection(QmlObjectListModel* visualItems, int sc
cameraAction()->setRawValue(TakePhotosIntervalTime); cameraAction()->setRawValue(TakePhotosIntervalTime);
cameraPhotoIntervalTime()->setRawValue(missionItem.param1()); cameraPhotoIntervalTime()->setRawValue(missionItem.param1());
visualItems->removeAt(scanIndex)->deleteLater(); visualItems->removeAt(scanIndex)->deleteLater();
} else {
stopLooking = true;
} }
stopLooking = true;
break; break;
case MAV_CMD_DO_SET_CAM_TRIGG_DIST: case MAV_CMD_DO_SET_CAM_TRIGG_DIST:
if (!foundCameraAction && missionItem.param1() >= 0 && missionItem.param2() == 0 && missionItem.param3() == 0 && missionItem.param4() == 0 && missionItem.param5() == 0 && missionItem.param6() == 0 && missionItem.param7() == 0) { if (!foundCameraAction && missionItem.param1() >= 0 && missionItem.param2() == 0 && missionItem.param3() == 0 && missionItem.param4() == 0 && missionItem.param5() == 0 && missionItem.param6() == 0 && missionItem.param7() == 0) {
// At this point we don't know if we have a stop taking photos pair, or a single distance trigger where the user specified 0 // At this point we don't know if we have a stop taking photos pair, or just a distance trigger
// We need to look at the next item to check for the stop taking photos pari
if (missionItem.param1() == 0 && scanIndex < visualItems->count() - 1) { if (missionItem.param1() == 0 && scanIndex < visualItems->count() - 1) {
// Possible stop taking photos pair
SimpleMissionItem* nextItem = visualItems->value<SimpleMissionItem*>(scanIndex + 1); SimpleMissionItem* nextItem = visualItems->value<SimpleMissionItem*>(scanIndex + 1);
if (nextItem) { if (nextItem) {
missionItem = nextItem->missionItem(); MissionItem& nextMissionItem = nextItem->missionItem();
if ((MAV_CMD)item->command() == MAV_CMD_IMAGE_STOP_CAPTURE && missionItem.param1() == 0 && missionItem.param2() == 0 && missionItem.param3() == 0 && missionItem.param4() == 0 && missionItem.param5() == 0 && missionItem.param6() == 0 && missionItem.param7() == 0) { if (nextMissionItem.command() == MAV_CMD_IMAGE_STOP_CAPTURE && nextMissionItem.param1() == 0 && nextMissionItem.param2() == 0 && nextMissionItem.param3() == 0 && nextMissionItem.param4() == 0 && nextMissionItem.param5() == 0 && nextMissionItem.param6() == 0 && nextMissionItem.param7() == 0) {
// We found a stop taking photos pair
foundCameraAction = true; foundCameraAction = true;
cameraAction()->setRawValue(StopTakingPhotos); cameraAction()->setRawValue(StopTakingPhotos);
visualItems->removeAt(scanIndex)->deleteLater(); visualItems->removeAt(scanIndex)->deleteLater();
visualItems->removeAt(scanIndex)->deleteLater(); visualItems->removeAt(scanIndex)->deleteLater();
stopLooking = true;
break; break;
} }
} }
} }
// We didn't find a stop taking photos pair, so this is a regular trigger distance item // We didn't find a stop taking photos pair, check for trigger distance
foundCameraAction = true; if (missionItem.param1() > 0) {
cameraAction()->setRawValue(TakePhotoIntervalDistance); foundCameraAction = true;
cameraPhotoIntervalDistance()->setRawValue(missionItem.param1()); cameraAction()->setRawValue(TakePhotoIntervalDistance);
visualItems->removeAt(scanIndex)->deleteLater(); cameraPhotoIntervalDistance()->setRawValue(missionItem.param1());
break; visualItems->removeAt(scanIndex)->deleteLater();
stopLooking = true;
break;
}
} }
stopLooking = true; stopLooking = true;
break; break;
...@@ -268,9 +272,8 @@ bool CameraSection::scanForCameraSection(QmlObjectListModel* visualItems, int sc ...@@ -268,9 +272,8 @@ bool CameraSection::scanForCameraSection(QmlObjectListModel* visualItems, int sc
foundCameraAction = true; foundCameraAction = true;
cameraAction()->setRawValue(TakeVideo); cameraAction()->setRawValue(TakeVideo);
visualItems->removeAt(scanIndex)->deleteLater(); visualItems->removeAt(scanIndex)->deleteLater();
} else {
stopLooking = true;
} }
stopLooking = true;
break; break;
case MAV_CMD_VIDEO_STOP_CAPTURE: case MAV_CMD_VIDEO_STOP_CAPTURE:
...@@ -278,9 +281,8 @@ bool CameraSection::scanForCameraSection(QmlObjectListModel* visualItems, int sc ...@@ -278,9 +281,8 @@ bool CameraSection::scanForCameraSection(QmlObjectListModel* visualItems, int sc
foundCameraAction = true; foundCameraAction = true;
cameraAction()->setRawValue(StopTakingVideo); cameraAction()->setRawValue(StopTakingVideo);
visualItems->removeAt(scanIndex)->deleteLater(); visualItems->removeAt(scanIndex)->deleteLater();
} else {
stopLooking = true;
} }
stopLooking = true;
break; break;
default: default:
......
...@@ -817,11 +817,11 @@ ...@@ -817,11 +817,11 @@
} }
}, },
{ {
"id": 206, "id": 206,
"rawName": "MAV_CMD_DO_SET_CAM_TRIGG_DIST", "rawName": "MAV_CMD_DO_SET_CAM_TRIGG_DIST",
"friendlyName": "Camera trigger distance", "friendlyName": "Camera trigger distance",
"description": "Set camera trigger distance.", "description": "Set camera trigger distance.",
"category": "Camera", "category": "Camera",
"param1": { "param1": {
"label": "Distance", "label": "Distance",
"default": 25, "default": 25,
......
...@@ -1538,10 +1538,8 @@ void MissionController::_scanForAdditionalSettings(QmlObjectListModel* visualIte ...@@ -1538,10 +1538,8 @@ void MissionController::_scanForAdditionalSettings(QmlObjectListModel* visualIte
} }
SimpleMissionItem* simpleItem = qobject_cast<SimpleMissionItem*>(visualItem); SimpleMissionItem* simpleItem = qobject_cast<SimpleMissionItem*>(visualItem);
if (simpleItem && simpleItem->cameraSection()->available()) { if (simpleItem) {
scanIndex++; simpleItem->scanForSections(visualItems, scanIndex + 1, vehicle);
simpleItem->scanForSections(visualItems, scanIndex, vehicle);
continue;
} }
scanIndex++; scanIndex++;
......
...@@ -655,16 +655,17 @@ double SimpleMissionItem::specifiedGimbalYaw(void) ...@@ -655,16 +655,17 @@ double SimpleMissionItem::specifiedGimbalYaw(void)
return _cameraSection->available() ? _cameraSection->specifiedGimbalYaw() : missionItem().specifiedGimbalYaw(); return _cameraSection->available() ? _cameraSection->specifiedGimbalYaw() : missionItem().specifiedGimbalYaw();
} }
void SimpleMissionItem::scanForSections(QmlObjectListModel* visualItems, int scanIndex, Vehicle* vehicle) bool SimpleMissionItem::scanForSections(QmlObjectListModel* visualItems, int scanIndex, Vehicle* vehicle)
{ {
Q_UNUSED(vehicle); bool sectionFound = false;
qDebug() << "SimpleMissionItem::scanForSections" << scanIndex << _cameraSection->available(); Q_UNUSED(vehicle);
if (_cameraSection->available()) { if (_cameraSection->available()) {
bool sectionFound = _cameraSection->scanForCameraSection(visualItems, scanIndex); sectionFound = _cameraSection->scanForCameraSection(visualItems, scanIndex);
qDebug() << sectionFound;
} }
return sectionFound;
} }
void SimpleMissionItem::_updateCameraSection(void) void SimpleMissionItem::_updateCameraSection(void)
......
...@@ -48,7 +48,8 @@ public: ...@@ -48,7 +48,8 @@ public:
/// @param visualItems List of all visual items /// @param visualItems List of all visual items
/// @param scanIndex Index to start scanning from /// @param scanIndex Index to start scanning from
/// @param vehicle Vehicle associated with this mission /// @param vehicle Vehicle associated with this mission
void scanForSections(QmlObjectListModel* visualItems, int scanIndex, Vehicle* vehicle); /// @return true: section found
bool scanForSections(QmlObjectListModel* visualItems, int scanIndex, Vehicle* vehicle);
// Property accesors // Property accesors
......
...@@ -130,6 +130,18 @@ ...@@ -130,6 +130,18 @@
"units": "m", "units": "m",
"defaultValue": 25 "defaultValue": 25
}, },
{
"name": "CameraTriggerInTurnaround",
"shortDescription": "Camera continues taking images in turnarounds.",
"type": "bool",
"defaultValue": false
},
{
"name": "HoverAndCapture",
"shortDescription": "Hover at each image point and take image",
"type": "bool",
"defaultValue": false
},
{ {
"name": "CameraOrientationLandscape", "name": "CameraOrientationLandscape",
"shortDescription": "Camera on vehicle is in landscape orientation.", "shortDescription": "Camera on vehicle is in landscape orientation.",
...@@ -140,7 +152,7 @@ ...@@ -140,7 +152,7 @@
"name": "FixedValueIsAltitude", "name": "FixedValueIsAltitude",
"shortDescription": "The altitude is kep constant while ground resolution changes.", "shortDescription": "The altitude is kep constant while ground resolution changes.",
"type": "bool", "type": "bool",
"defaultValue": 0 "defaultValue": false
}, },
{ {
"name": "Camera", "name": "Camera",
......
This diff is collapsed.
...@@ -32,6 +32,8 @@ public: ...@@ -32,6 +32,8 @@ public:
Q_PROPERTY(Fact* turnaroundDist READ turnaroundDist CONSTANT) Q_PROPERTY(Fact* turnaroundDist READ turnaroundDist CONSTANT)
Q_PROPERTY(Fact* cameraTrigger READ cameraTrigger CONSTANT) Q_PROPERTY(Fact* cameraTrigger READ cameraTrigger CONSTANT)
Q_PROPERTY(Fact* cameraTriggerDistance READ cameraTriggerDistance CONSTANT) Q_PROPERTY(Fact* cameraTriggerDistance READ cameraTriggerDistance CONSTANT)
Q_PROPERTY(Fact* cameraTriggerInTurnaround READ cameraTriggerInTurnaround CONSTANT)
Q_PROPERTY(Fact* hoverAndCapture READ hoverAndCapture CONSTANT)
Q_PROPERTY(Fact* groundResolution READ groundResolution CONSTANT) Q_PROPERTY(Fact* groundResolution READ groundResolution CONSTANT)
Q_PROPERTY(Fact* frontalOverlap READ frontalOverlap CONSTANT) Q_PROPERTY(Fact* frontalOverlap READ frontalOverlap CONSTANT)
Q_PROPERTY(Fact* sideOverlap READ sideOverlap CONSTANT) Q_PROPERTY(Fact* sideOverlap READ sideOverlap CONSTANT)
...@@ -68,7 +70,7 @@ public: ...@@ -68,7 +70,7 @@ public:
QVariantList polygonPath (void) { return _polygonPath; } QVariantList polygonPath (void) { return _polygonPath; }
QmlObjectListModel* polygonModel(void) { return &_polygonModel; } QmlObjectListModel* polygonModel(void) { return &_polygonModel; }
QVariantList gridPoints (void) { return _gridPoints; } QVariantList gridPoints (void) { return _simpleGridPoints; }
Fact* manualGrid (void) { return &_manualGridFact; } Fact* manualGrid (void) { return &_manualGridFact; }
Fact* gridAltitude (void) { return &_gridAltitudeFact; } Fact* gridAltitude (void) { return &_gridAltitudeFact; }
...@@ -78,6 +80,8 @@ public: ...@@ -78,6 +80,8 @@ public:
Fact* turnaroundDist (void) { return &_turnaroundDistFact; } Fact* turnaroundDist (void) { return &_turnaroundDistFact; }
Fact* cameraTrigger (void) { return &_cameraTriggerFact; } Fact* cameraTrigger (void) { return &_cameraTriggerFact; }
Fact* cameraTriggerDistance (void) { return &_cameraTriggerDistanceFact; } Fact* cameraTriggerDistance (void) { return &_cameraTriggerDistanceFact; }
Fact* cameraTriggerInTurnaround (void) { return &_cameraTriggerInTurnaroundFact; }
Fact* hoverAndCapture (void) { return &_hoverAndCaptureFact; }
Fact* groundResolution (void) { return &_groundResolutionFact; } Fact* groundResolution (void) { return &_groundResolutionFact; }
Fact* frontalOverlap (void) { return &_frontalOverlapFact; } Fact* frontalOverlap (void) { return &_frontalOverlapFact; }
Fact* sideOverlap (void) { return &_sideOverlapFact; } Fact* sideOverlap (void) { return &_sideOverlapFact; }
...@@ -141,6 +145,8 @@ public: ...@@ -141,6 +145,8 @@ public:
static const char* gridSpacingName; static const char* gridSpacingName;
static const char* turnaroundDistName; static const char* turnaroundDistName;
static const char* cameraTriggerDistanceName; static const char* cameraTriggerDistanceName;
static const char* cameraTriggerInTurnaroundName;
static const char* hoverAndCaptureName;
static const char* groundResolutionName; static const char* groundResolutionName;
static const char* frontalOverlapName; static const char* frontalOverlapName;
static const char* sideOverlapName; static const char* sideOverlapName;
...@@ -166,14 +172,21 @@ signals: ...@@ -166,14 +172,21 @@ signals:
private slots: private slots:
void _cameraTriggerChanged(void); void _cameraTriggerChanged(void);
void _setDirty(void);
private: private:
enum CameraTriggerCode {
CameraTriggerNone,
CameraTriggerOn,
CameraTriggerOff
};
void _clear(void); void _clear(void);
void _setExitCoordinate(const QGeoCoordinate& coordinate); void _setExitCoordinate(const QGeoCoordinate& coordinate);
void _clearGrid(void); void _clearGrid(void);
void _generateGrid(void); void _generateGrid(void);
void _updateCoordinateAltitude(void); void _updateCoordinateAltitude(void);
void _gridGenerator(const QList<QPointF>& polygonPoints, QList<QPointF>& gridPoints); void _gridGenerator(const QList<QPointF>& polygonPoints, QList<QPointF>& simpleGridPoints, QList<QList<QPointF>>& gridSegments);
QPointF _rotatePoint(const QPointF& point, const QPointF& origin, double angle); QPointF _rotatePoint(const QPointF& point, const QPointF& origin, double angle);
void _intersectLinesWithRect(const QList<QLineF>& lineList, const QRectF& boundRect, QList<QLineF>& resultLines); void _intersectLinesWithRect(const QList<QLineF>& lineList, const QRectF& boundRect, QList<QLineF>& resultLines);
void _intersectLinesWithPolygon(const QList<QLineF>& lineList, const QPolygonF& polygon, QList<QLineF>& resultLines); void _intersectLinesWithPolygon(const QList<QLineF>& lineList, const QPolygonF& polygon, QList<QLineF>& resultLines);
...@@ -182,15 +195,17 @@ private: ...@@ -182,15 +195,17 @@ private:
void _setCameraShots(int cameraShots); void _setCameraShots(int cameraShots);
void _setCoveredArea(double coveredArea); void _setCoveredArea(double coveredArea);
void _cameraValueChanged(void); void _cameraValueChanged(void);
int _appendWaypointToMission(QList<MissionItem*>& items, int seqNum, QGeoCoordinate& coord, CameraTriggerCode cameraTrigger, QObject* missionItemParent);
int _sequenceNumber;
bool _dirty; int _sequenceNumber;
QVariantList _polygonPath; bool _dirty;
QmlObjectListModel _polygonModel; QVariantList _polygonPath;
QVariantList _gridPoints; QmlObjectListModel _polygonModel;
QGeoCoordinate _coordinate; QVariantList _simpleGridPoints; ///< Grid points for drawing simple grid visuals
QGeoCoordinate _exitCoordinate; QList<QList<QGeoCoordinate>> _gridSegments; ///< Internal grid line segments including grid exit and turnaround point
bool _cameraOrientationFixed; QGeoCoordinate _coordinate;
QGeoCoordinate _exitCoordinate;
bool _cameraOrientationFixed;
double _surveyDistance; double _surveyDistance;
int _cameraShots; int _cameraShots;
...@@ -208,6 +223,8 @@ private: ...@@ -208,6 +223,8 @@ private:
SettingsFact _turnaroundDistFact; SettingsFact _turnaroundDistFact;
SettingsFact _cameraTriggerFact; SettingsFact _cameraTriggerFact;
SettingsFact _cameraTriggerDistanceFact; SettingsFact _cameraTriggerDistanceFact;
SettingsFact _cameraTriggerInTurnaroundFact;
SettingsFact _hoverAndCaptureFact;
SettingsFact _groundResolutionFact; SettingsFact _groundResolutionFact;
SettingsFact _frontalOverlapFact; SettingsFact _frontalOverlapFact;
SettingsFact _sideOverlapFact; SettingsFact _sideOverlapFact;
...@@ -229,6 +246,8 @@ private: ...@@ -229,6 +246,8 @@ private:
static const char* _jsonTurnaroundDistKey; static const char* _jsonTurnaroundDistKey;
static const char* _jsonCameraTriggerKey; static const char* _jsonCameraTriggerKey;
static const char* _jsonCameraTriggerDistanceKey; static const char* _jsonCameraTriggerDistanceKey;
static const char* _jsonCameraTriggerInTurnaroundKey;
static const char* _jsonHoverAndCaptureKey;
static const char* _jsonGroundResolutionKey; static const char* _jsonGroundResolutionKey;
static const char* _jsonFrontalOverlapKey; static const char* _jsonFrontalOverlapKey;
static const char* _jsonSideOverlapKey; static const char* _jsonSideOverlapKey;
......
...@@ -180,40 +180,73 @@ Rectangle { ...@@ -180,40 +180,73 @@ Rectangle {
spacing: _margin spacing: _margin
SectionHeader { SectionHeader {
id: cameraHeader
text: qsTr("Camera") text: qsTr("Camera")
showSpacer: false showSpacer: false
} }
QGCComboBox { Column {
id: gridTypeCombo
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
model: _cameraList spacing: _margin
currentIndex: -1 visible: cameraHeader.checked
onActivated: { QGCComboBox {
if (index == _gridTypeManual) { id: gridTypeCombo
missionItem.manualGrid.value = true anchors.left: parent.left
} else if (index == _gridTypeCustomCamera) { anchors.right: parent.right
missionItem.manualGrid.value = false model: _cameraList
missionItem.camera.value = gridTypeCombo.textAt(index) currentIndex: -1
missionItem.cameraOrientationFixed = false
} else { onActivated: {
missionItem.manualGrid.value = false if (index == _gridTypeManual) {
missionItem.camera.value = gridTypeCombo.textAt(index) missionItem.manualGrid.value = true
_noCameraValueRecalc = true } else if (index == _gridTypeCustomCamera) {
var listIndex = index - _gridTypeCamera missionItem.manualGrid.value = false
missionItem.cameraSensorWidth.rawValue = _vehicleCameraList[listIndex].sensorWidth missionItem.camera.value = gridTypeCombo.textAt(index)
missionItem.cameraSensorHeight.rawValue = _vehicleCameraList[listIndex].sensorHeight missionItem.cameraOrientationFixed = false
missionItem.cameraResolutionWidth.rawValue = _vehicleCameraList[listIndex].imageWidth } else {
missionItem.cameraResolutionHeight.rawValue = _vehicleCameraList[listIndex].imageHeight missionItem.manualGrid.value = false
missionItem.cameraFocalLength.rawValue = _vehicleCameraList[listIndex].focalLength missionItem.camera.value = gridTypeCombo.textAt(index)
missionItem.cameraOrientationLandscape.rawValue = _vehicleCameraList[listIndex].landscape ? 1 : 0 _noCameraValueRecalc = true
missionItem.cameraOrientationFixed = _vehicleCameraList[listIndex].fixedOrientation var listIndex = index - _gridTypeCamera
_noCameraValueRecalc = false missionItem.cameraSensorWidth.rawValue = _vehicleCameraList[listIndex].sensorWidth
recalcFromCameraValues() missionItem.cameraSensorHeight.rawValue = _vehicleCameraList[listIndex].sensorHeight
missionItem.cameraResolutionWidth.rawValue = _vehicleCameraList[listIndex].imageWidth
missionItem.cameraResolutionHeight.rawValue = _vehicleCameraList[listIndex].imageHeight
missionItem.cameraFocalLength.rawValue = _vehicleCameraList[listIndex].focalLength
missionItem.cameraOrientationLandscape.rawValue = _vehicleCameraList[listIndex].landscape ? 1 : 0
missionItem.cameraOrientationFixed = _vehicleCameraList[listIndex].fixedOrientation
_noCameraValueRecalc = false
recalcFromCameraValues()
}
}
}
RowLayout {
anchors.left: parent.left
anchors.right: parent.right
spacing: _margin
visible: missionItem.manualGrid.value == true
FactCheckBox {
anchors.baseline: cameraTriggerDistanceField.baseline
text: qsTr("Trigger Distance")
fact: missionItem.cameraTrigger
}
FactTextField {
id: cameraTriggerDistanceField
Layout.fillWidth: true
fact: missionItem.cameraTriggerDistance
enabled: missionItem.cameraTrigger.value
} }
} }
FactCheckBox {
text: qsTr("Hover and capture image")
fact: missionItem.hoverAndCapture
}
} }
// Camera based grid ui // Camera based grid ui
...@@ -343,7 +376,10 @@ Rectangle { ...@@ -343,7 +376,10 @@ Rectangle {
} }
} }
SectionHeader { text: qsTr("Grid") } SectionHeader {
id: gridHeader
text: qsTr("Grid")
}
GridLayout { GridLayout {
anchors.left: parent.left anchors.left: parent.left
...@@ -351,6 +387,7 @@ Rectangle { ...@@ -351,6 +387,7 @@ Rectangle {
columnSpacing: _margin columnSpacing: _margin
rowSpacing: _margin rowSpacing: _margin
columns: 2 columns: 2
visible: gridHeader.checked
QGCLabel { text: qsTr("Angle") } QGCLabel { text: qsTr("Angle") }
FactTextField { FactTextField {
...@@ -403,13 +440,17 @@ Rectangle { ...@@ -403,13 +440,17 @@ Rectangle {
} }
// Manual grid ui // Manual grid ui
SectionHeader {
id: manualGridHeader
text: qsTr("Grid")
visible: gridTypeCombo.currentIndex == _gridTypeManual
}
Column { Column {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
spacing: _margin spacing: _margin
visible: gridTypeCombo.currentIndex == _gridTypeManual visible: manualGridHeader.visible && manualGridHeader.checked
SectionHeader { text: qsTr("Grid") }
FactTextFieldGrid { FactTextFieldGrid {
anchors.left: parent.left anchors.left: parent.left
...@@ -420,50 +461,21 @@ Rectangle { ...@@ -420,50 +461,21 @@ Rectangle {
factLabels: [ qsTr("Angle"), qsTr("Spacing"), qsTr("Altitude"), qsTr("Turnaround dist")] factLabels: [ qsTr("Angle"), qsTr("Spacing"), qsTr("Altitude"), qsTr("Turnaround dist")]
} }
Item { height: _margin; width: 1; visible: !ScreenTools.isTinyScreen }
FactCheckBox { FactCheckBox {
anchors.left: parent.left anchors.left: parent.left
text: qsTr("Relative altitude") text: qsTr("Relative altitude")
fact: missionItem.gridAltitudeRelative fact: missionItem.gridAltitudeRelative
} }
Item { height: _sectionSpacer; width: 1; visible: !ScreenTools.isTinyScreen }
QGCLabel { text: qsTr("Camera") }
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
height: 1
color: qgcPal.text
}
RowLayout {
anchors.left: parent.left
anchors.right: parent.right
spacing: _margin
FactCheckBox {
anchors.baseline: cameraTriggerDistanceField.baseline
text: qsTr("Trigger Distance")
fact: missionItem.cameraTrigger
}
FactTextField {
id: cameraTriggerDistanceField
Layout.fillWidth: true
fact: missionItem.cameraTriggerDistance
enabled: missionItem.cameraTrigger.value
}
}
} }
SectionHeader { text: qsTr("Statistics") } SectionHeader {
id: statsHeader
text: qsTr("Statistics") }
Grid { Grid {
columns: 2 columns: 2
columnSpacing: ScreenTools.defaultFontPixelWidth columnSpacing: ScreenTools.defaultFontPixelWidth
visible: statsHeader.checked
QGCLabel { text: qsTr("Survey area") } QGCLabel { text: qsTr("Survey area") }
QGCLabel { text: QGroundControl.squareMetersToAppSettingsAreaUnits(missionItem.coveredArea).toFixed(2) + " " + QGroundControl.appSettingsAreaUnitsString } QGCLabel { text: QGroundControl.squareMetersToAppSettingsAreaUnits(missionItem.coveredArea).toFixed(2) + " " + QGroundControl.appSettingsAreaUnitsString }
......
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