Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
a5fc3fa8
Unverified
Commit
a5fc3fa8
authored
Jul 29, 2019
by
Gus Grubba
Committed by
GitHub
Jul 29, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7638 from mavlink/cameraMissionCommands
Camera mission commands
parents
4b9b1038
50b08157
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
25 deletions
+27
-25
MavCmdInfoCommon.json
src/MissionManager/MavCmdInfoCommon.json
+4
-2
MissionCommandList.cc
src/MissionManager/MissionCommandList.cc
+1
-1
MissionCommandTree.cc
src/MissionManager/MissionCommandTree.cc
+1
-1
MissionCommandUIInfo.cc
src/MissionManager/MissionCommandUIInfo.cc
+2
-2
SimpleMissionItem.cc
src/MissionManager/SimpleMissionItem.cc
+18
-19
SimpleItemEditor.qml
src/PlanView/SimpleItemEditor.qml
+1
-0
No files found.
src/MissionManager/MavCmdInfoCommon.json
View file @
a5fc3fa8
...
...
@@ -1024,7 +1024,8 @@
"rawName"
:
"MAV_CMD_IMAGE_STOP_CAPTURE"
,
"friendlyName"
:
"Stop image capture"
,
"description"
:
"Stop taking photos."
,
"category"
:
"Camera"
"category"
:
"Camera"
,
"friendlyEdit"
:
true
},
{
"id"
:
2003
,
"rawName"
:
"MAV_CMD_DO_TRIGGER_CONTROL", "friendlyName"
:
"Trigger control"
},
{
...
...
@@ -1045,7 +1046,8 @@
"rawName"
:
"MAV_CMD_VIDEO_STOP_CAPTURE"
,
"friendlyName"
:
"Stop video capture"
,
"description"
:
"Stop video capture."
,
"category"
:
"Camera"
"category"
:
"Camera"
,
"friendlyEdit"
:
true
},
{
"id"
:
2800
,
"rawName"
:
"MAV_CMD_PANORAMA_CREATE", "friendlyName"
:
"Create panorama"
},
{
...
...
src/MissionManager/MissionCommandList.cc
View file @
a5fc3fa8
...
...
@@ -104,7 +104,7 @@ void MissionCommandList::_loadMavCmdInfoJson(const QString& jsonFilename, bool b
MissionCommandUIInfo
*
MissionCommandList
::
getUIInfo
(
MAV_CMD
command
)
const
{
if
(
!
_infoMap
.
contains
(
command
))
{
return
NULL
;
return
nullptr
;
}
return
_infoMap
[
command
];
...
...
src/MissionManager/MissionCommandTree.cc
View file @
a5fc3fa8
...
...
@@ -24,7 +24,7 @@
MissionCommandTree
::
MissionCommandTree
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
,
bool
unitTest
)
:
QGCTool
(
app
,
toolbox
)
,
_allCommandsCategory
(
tr
(
"All commands"
))
,
_settingsManager
(
NULL
)
,
_settingsManager
(
nullptr
)
,
_unitTest
(
unitTest
)
{
}
...
...
src/MissionManager/MissionCommandUIInfo.cc
View file @
a5fc3fa8
...
...
@@ -409,13 +409,13 @@ bool MissionCommandUIInfo::loadJsonInfo(const QJsonObject& jsonObject, bool requ
const
MissionCmdParamInfo
*
MissionCommandUIInfo
::
getParamInfo
(
int
index
,
bool
&
showUI
)
const
{
const
MissionCmdParamInfo
*
paramInfo
=
NULL
;
const
MissionCmdParamInfo
*
paramInfo
=
nullptr
;
if
(
_paramInfoMap
.
contains
(
index
))
{
paramInfo
=
_paramInfoMap
[
index
];
}
showUI
=
(
paramInfo
!=
NULL
)
&&
!
_paramRemoveList
.
contains
(
index
);
showUI
=
(
paramInfo
!=
nullptr
)
&&
!
_paramRemoveList
.
contains
(
index
);
return
paramInfo
;
}
src/MissionManager/SimpleMissionItem.cc
View file @
a5fc3fa8
...
...
@@ -20,12 +20,12 @@
#include "QGroundControlQmlGlobal.h"
#include "SettingsManager.h"
FactMetaData
*
SimpleMissionItem
::
_altitudeMetaData
=
NULL
;
FactMetaData
*
SimpleMissionItem
::
_commandMetaData
=
NULL
;
FactMetaData
*
SimpleMissionItem
::
_defaultParamMetaData
=
NULL
;
FactMetaData
*
SimpleMissionItem
::
_frameMetaData
=
NULL
;
FactMetaData
*
SimpleMissionItem
::
_latitudeMetaData
=
NULL
;
FactMetaData
*
SimpleMissionItem
::
_longitudeMetaData
=
NULL
;
FactMetaData
*
SimpleMissionItem
::
_altitudeMetaData
=
nullptr
;
FactMetaData
*
SimpleMissionItem
::
_commandMetaData
=
nullptr
;
FactMetaData
*
SimpleMissionItem
::
_defaultParamMetaData
=
nullptr
;
FactMetaData
*
SimpleMissionItem
::
_frameMetaData
=
nullptr
;
FactMetaData
*
SimpleMissionItem
::
_latitudeMetaData
=
nullptr
;
FactMetaData
*
SimpleMissionItem
::
_longitudeMetaData
=
nullptr
;
const
char
*
SimpleMissionItem
::
_jsonAltitudeModeKey
=
"AltitudeMode"
;
const
char
*
SimpleMissionItem
::
_jsonAltitudeKey
=
"Altitude"
;
...
...
@@ -152,8 +152,8 @@ SimpleMissionItem::SimpleMissionItem(const SimpleMissionItem& other, bool flyVie
,
_rawEdit
(
false
)
,
_dirty
(
false
)
,
_ignoreDirtyChangeSignals
(
false
)
,
_speedSection
(
NULL
)
,
_cameraSection
(
NULL
)
,
_speedSection
(
nullptr
)
,
_cameraSection
(
nullptr
)
,
_commandTree
(
qgcApp
()
->
toolbox
()
->
missionCommandTree
())
,
_supportedCommandFact
(
0
,
"Command:"
,
FactMetaData
::
valueTypeUint32
)
,
_altitudeMode
(
other
.
_altitudeMode
)
...
...
@@ -595,7 +595,7 @@ void SimpleMissionItem::_rebuildFacts(void)
bool
SimpleMissionItem
::
friendlyEditAllowed
(
void
)
const
{
const
MissionCommandUIInfo
*
uiInfo
=
_commandTree
->
getUIInfo
(
_vehicle
,
(
MAV_CMD
)
command
(
));
const
MissionCommandUIInfo
*
uiInfo
=
_commandTree
->
getUIInfo
(
_vehicle
,
static_cast
<
MAV_CMD
>
(
command
()
));
if
(
uiInfo
&&
uiInfo
->
friendlyEdit
())
{
if
(
!
_missionItem
.
autoContinue
())
{
return
false
;
...
...
@@ -607,7 +607,6 @@ bool SimpleMissionItem::friendlyEditAllowed(void) const
case
MAV_FRAME_GLOBAL
:
case
MAV_FRAME_GLOBAL_RELATIVE_ALT
:
return
true
;
break
;
case
MAV_FRAME_GLOBAL_TERRAIN_ALT
:
return
supportsTerrainFrame
();
...
...
@@ -759,7 +758,7 @@ void SimpleMissionItem::_setDefaultsForCommand(void)
_missionItem
.
_param7Fact
.
setRawValue
(
0
);
}
MAV_CMD
command
=
(
MAV_CMD
)
this
->
command
(
);
MAV_CMD
command
=
static_cast
<
MAV_CMD
>
(
this
->
command
()
);
const
MissionCommandUIInfo
*
uiInfo
=
_commandTree
->
getUIInfo
(
_vehicle
,
command
);
if
(
uiInfo
)
{
for
(
int
i
=
1
;
i
<=
7
;
i
++
)
{
...
...
@@ -806,13 +805,13 @@ void SimpleMissionItem::_sendFriendlyEditAllowedChanged(void)
QString
SimpleMissionItem
::
category
(
void
)
const
{
return
_commandTree
->
getUIInfo
(
_vehicle
,
(
MAV_CMD
)
command
(
))
->
category
();
return
_commandTree
->
getUIInfo
(
_vehicle
,
static_cast
<
MAV_CMD
>
(
command
()
))
->
category
();
}
void
SimpleMissionItem
::
setCommand
(
int
command
)
{
if
(
(
MAV_CMD
)
command
!=
_missionItem
.
command
())
{
_missionItem
.
setCommand
(
(
MAV_CMD
)
command
);
if
(
static_cast
<
MAV_CMD
>
(
command
)
!=
_missionItem
.
command
())
{
_missionItem
.
setCommand
(
static_cast
<
MAV_CMD
>
(
command
)
);
_updateOptionalSections
();
}
}
...
...
@@ -876,18 +875,18 @@ void SimpleMissionItem::_updateOptionalSections(void)
// Remove previous sections
if
(
_cameraSection
)
{
_cameraSection
->
deleteLater
();
_cameraSection
=
NULL
;
_cameraSection
=
nullptr
;
}
if
(
_speedSection
)
{
_speedSection
->
deleteLater
();
_speedSection
=
NULL
;
_speedSection
=
nullptr
;
}
// Add new sections
_cameraSection
=
new
CameraSection
(
_vehicle
,
this
);
_speedSection
=
new
SpeedSection
(
_vehicle
,
this
);
if
(
(
MAV_CMD
)
command
(
)
==
MAV_CMD_NAV_WAYPOINT
)
{
if
(
static_cast
<
MAV_CMD
>
(
command
()
)
==
MAV_CMD_NAV_WAYPOINT
)
{
_cameraSection
->
setAvailable
(
true
);
_speedSection
->
setAvailable
(
true
);
}
...
...
@@ -938,11 +937,11 @@ void SimpleMissionItem::appendMissionItems(QList<MissionItem*>& items, QObject*
void
SimpleMissionItem
::
applyNewAltitude
(
double
newAltitude
)
{
MAV_CMD
command
=
(
MAV_CMD
)
this
->
command
(
);
MAV_CMD
command
=
static_cast
<
MAV_CMD
>
(
this
->
command
()
);
const
MissionCommandUIInfo
*
uiInfo
=
_commandTree
->
getUIInfo
(
_vehicle
,
command
);
if
(
uiInfo
->
specifiesCoordinate
()
||
uiInfo
->
specifiesAltitudeOnly
())
{
switch
(
(
MAV_CMD
)
this
->
command
(
))
{
switch
(
static_cast
<
MAV_CMD
>
(
this
->
command
()
))
{
case
MAV_CMD_NAV_LAND
:
case
MAV_CMD_NAV_VTOL_LAND
:
// Leave alone
...
...
src/PlanView/SimpleItemEditor.qml
View file @
a5fc3fa8
...
...
@@ -92,6 +92,7 @@ Rectangle {
indexModel
:
false
model
:
object
.
enumStrings
fact
:
object
pointSize
:
ScreenTools
.
smallFontPointSize
Layout.column
:
1
Layout.row
:
index
Layout.fillWidth
:
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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