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
a563f89c
Commit
a563f89c
authored
Sep 07, 2012
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #163 from barthess/msg_id_command_ack_handler
Fixed reporting of command execution status
parents
bc8dbe8a
1bd35157
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
UAS.cc
src/uas/UAS.cc
+25
-4
No files found.
src/uas/UAS.cc
View file @
a563f89c
...
@@ -886,17 +886,38 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
...
@@ -886,17 +886,38 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
}
}
break
;
break
;
case
MAVLINK_MSG_ID_COMMAND_ACK
:
case
MAVLINK_MSG_ID_COMMAND_ACK
:
{
mavlink_command_ack_t
ack
;
mavlink_command_ack_t
ack
;
mavlink_msg_command_ack_decode
(
&
message
,
&
ack
);
mavlink_msg_command_ack_decode
(
&
message
,
&
ack
);
if
(
ack
.
result
==
1
)
switch
(
ack
.
result
)
{
case
MAV_RESULT_ACCEPTED
:
{
{
emit
textMessageReceived
(
uasId
,
message
.
compid
,
0
,
tr
(
"SUCCESS: Executed CMD: %1"
).
arg
(
ack
.
command
));
emit
textMessageReceived
(
uasId
,
message
.
compid
,
0
,
tr
(
"SUCCESS: Executed CMD: %1"
).
arg
(
ack
.
command
));
}
}
else
break
;
case
MAV_RESULT_TEMPORARILY_REJECTED
:
{
{
emit
textMessageReceived
(
uasId
,
message
.
compid
,
0
,
tr
(
"FAILURE:
R
ejected CMD: %1"
).
arg
(
ack
.
command
));
emit
textMessageReceived
(
uasId
,
message
.
compid
,
0
,
tr
(
"FAILURE:
Temporarily r
ejected CMD: %1"
).
arg
(
ack
.
command
));
}
}
break
;
break
;
case
MAV_RESULT_DENIED
:
{
emit
textMessageReceived
(
uasId
,
message
.
compid
,
0
,
tr
(
"FAILURE: Denied CMD: %1"
).
arg
(
ack
.
command
));
}
break
;
case
MAV_RESULT_UNSUPPORTED
:
{
emit
textMessageReceived
(
uasId
,
message
.
compid
,
0
,
tr
(
"FAILURE: Unsupported CMD: %1"
).
arg
(
ack
.
command
));
}
break
;
case
MAV_RESULT_FAILED
:
{
emit
textMessageReceived
(
uasId
,
message
.
compid
,
0
,
tr
(
"FAILURE: Failed CMD: %1"
).
arg
(
ack
.
command
));
}
break
;
}
}
case
MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT
:
case
MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT
:
{
{
mavlink_roll_pitch_yaw_thrust_setpoint_t
out
;
mavlink_roll_pitch_yaw_thrust_setpoint_t
out
;
...
...
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