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
bf0baf70
Commit
bf0baf70
authored
May 10, 2017
by
DonLakeFlyer
Browse files
Better error reporting for unknown command
parent
4fc1047b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/MissionManager/MissionManager.cc
View file @
bf0baf70
...
...
@@ -16,6 +16,8 @@
#include
"FirmwarePlugin.h"
#include
"MAVLinkProtocol.h"
#include
"QGCApplication.h"
#include
"MissionCommandTree.h"
#include
"MissionCommandUIInfo.h"
QGC_LOGGING_CATEGORY
(
MissionManagerLog
,
"MissionManagerLog"
)
...
...
@@ -753,7 +755,16 @@ QString MissionManager::_lastMissionReqestString(MAV_MISSION_RESULT result)
case
MAV_MISSION_UNSUPPORTED_FRAME
:
return
QString
(
". Frame: %1"
).
arg
(
item
->
frame
());
case
MAV_MISSION_UNSUPPORTED
:
return
QString
(
". Command: %1"
).
arg
(
item
->
command
());
{
const
MissionCommandUIInfo
*
uiInfo
=
qgcApp
()
->
toolbox
()
->
missionCommandTree
()
->
getUIInfo
(
_vehicle
,
item
->
command
());
QString
friendlyName
;
QString
rawName
;
if
(
uiInfo
)
{
friendlyName
=
uiInfo
->
friendlyName
();
rawName
=
uiInfo
->
rawName
();
}
return
QString
(
". Command: (%1, %2, %3)"
).
arg
(
friendlyName
).
arg
(
rawName
).
arg
(
item
->
command
());
}
case
MAV_MISSION_INVALID_PARAM1
:
return
QString
(
". Param1: %1"
).
arg
(
item
->
param1
());
case
MAV_MISSION_INVALID_PARAM2
:
...
...
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