Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
e5a4fef1
Commit
e5a4fef1
authored
Mar 31, 2017
by
DonLakeFlyer
Browse files
Hover and Capture support
parent
296a43ce
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
View file @
e5a4fef1
...
...
@@ -267,7 +267,8 @@ QList<MAV_CMD> PX4FirmwarePlugin::supportedMissionCommands(void)
<<
MAV_CMD_DO_LAND_START
<<
MAV_CMD_DO_MOUNT_CONFIGURE
<<
MAV_CMD_DO_MOUNT_CONTROL
<<
MAV_CMD_IMAGE_START_CAPTURE
<<
MAV_CMD_IMAGE_STOP_CAPTURE
<<
MAV_CMD_VIDEO_START_CAPTURE
<<
MAV_CMD_VIDEO_STOP_CAPTURE
;
<<
MAV_CMD_IMAGE_START_CAPTURE
<<
MAV_CMD_IMAGE_STOP_CAPTURE
<<
MAV_CMD_VIDEO_START_CAPTURE
<<
MAV_CMD_VIDEO_STOP_CAPTURE
<<
MAV_CMD_NAV_DELAY
;
return
list
;
}
...
...
src/MissionManager/SurveyMissionItem.cc
View file @
e5a4fef1
This diff is collapsed.
Click to expand it.
src/MissionManager/SurveyMissionItem.h
View file @
e5a4fef1
...
...
@@ -48,6 +48,7 @@ public:
Q_PROPERTY
(
Fact
*
camera
READ
camera
CONSTANT
)
Q_PROPERTY
(
bool
cameraOrientationFixed
MEMBER
_cameraOrientationFixed
NOTIFY
cameraOrientationFixedChanged
)
Q_PROPERTY
(
bool
hoverAndCaptureAllowed
READ
hoverAndCaptureAllowed
CONSTANT
)
Q_PROPERTY
(
double
timeBetweenShots
READ
timeBetweenShots
NOTIFY
timeBetweenShotsChanged
)
Q_PROPERTY
(
QVariantList
polygonPath
READ
polygonPath
NOTIFY
polygonPathChanged
)
...
...
@@ -97,6 +98,7 @@ public:
int
cameraShots
(
void
)
const
;
double
coveredArea
(
void
)
const
{
return
_coveredArea
;
}
double
timeBetweenShots
(
void
)
const
;
bool
hoverAndCaptureAllowed
(
void
)
const
;
// Overrides from ComplexMissionItem
...
...
@@ -171,14 +173,14 @@ signals:
void
cameraOrientationFixedChanged
(
bool
cameraOrientationFixed
);
private
slots
:
void
_cameraTriggerChanged
(
void
);
void
_setDirty
(
void
);
private:
enum
CameraTriggerCode
{
CameraTriggerNone
,
CameraTriggerOn
,
CameraTriggerOff
CameraTriggerOff
,
CameraTriggerHoverAndCapture
};
void
_clear
(
void
);
...
...
@@ -186,7 +188,7 @@ private:
void
_clearGrid
(
void
);
void
_generateGrid
(
void
);
void
_updateCoordinateAltitude
(
void
);
void
_gridGenerator
(
const
QList
<
QPointF
>&
polygonPoints
,
QList
<
QPointF
>&
simpleGridPoints
,
QList
<
QList
<
QPointF
>>&
grid
Segments
);
void
_gridGenerator
(
const
QList
<
QPointF
>&
polygonPoints
,
QList
<
QPointF
>&
simpleGridPoints
,
QList
<
QList
<
QPointF
>>&
transect
Segments
);
QPointF
_rotatePoint
(
const
QPointF
&
point
,
const
QPointF
&
origin
,
double
angle
);
void
_intersectLinesWithRect
(
const
QList
<
QLineF
>&
lineList
,
const
QRectF
&
boundRect
,
QList
<
QLineF
>&
resultLines
);
void
_intersectLinesWithPolygon
(
const
QList
<
QLineF
>&
lineList
,
const
QPolygonF
&
polygon
,
QList
<
QLineF
>&
resultLines
);
...
...
@@ -196,16 +198,24 @@ private:
void
_setCoveredArea
(
double
coveredArea
);
void
_cameraValueChanged
(
void
);
int
_appendWaypointToMission
(
QList
<
MissionItem
*>&
items
,
int
seqNum
,
QGeoCoordinate
&
coord
,
CameraTriggerCode
cameraTrigger
,
QObject
*
missionItemParent
);
bool
_nextTransectCoord
(
const
QList
<
QGeoCoordinate
>&
transectPoints
,
int
pointIndex
,
QGeoCoordinate
&
coord
);
double
_triggerDistance
(
void
)
const
;
bool
_triggerCamera
(
void
)
const
;
bool
_imagesEverywhere
(
void
)
const
;
bool
_hoverAndCaptureEnabled
(
void
)
const
;
bool
_hasTurnaround
(
void
)
const
;
double
_turnaroundDistance
(
void
)
const
;
int
_sequenceNumber
;
bool
_dirty
;
QVariantList
_polygonPath
;
QmlObjectListModel
_polygonModel
;
QVariantList
_simpleGridPoints
;
///< Grid points for drawing simple grid visuals
QList
<
QList
<
QGeoCoordinate
>>
_
grid
Segments
;
///< Internal
grid line
segments including grid exit
and
turnaround point
QList
<
QList
<
QGeoCoordinate
>>
_
transect
Segments
;
///< Internal
transect
segments including grid exit
,
turnaround
and internal camera
point
s
QGeoCoordinate
_coordinate
;
QGeoCoordinate
_exitCoordinate
;
bool
_cameraOrientationFixed
;
int
_missionCommandCount
;
double
_surveyDistance
;
int
_cameraShots
;
...
...
src/PlanView/SurveyItemEditor.qml
View file @
e5a4fef1
...
...
@@ -244,8 +244,9 @@ Rectangle {
}
FactCheckBox
{
text
:
qsTr
(
"
Hover and capture image
"
)
fact
:
missionItem
.
hoverAndCapture
text
:
qsTr
(
"
Hover and capture image
"
)
fact
:
missionItem
.
hoverAndCapture
visible
:
missionItem
.
hoverAndCaptureAllowed
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment