diff options
author | Matt Beall <matt.beall@greypointcorp.com> | 2015-03-31 10:52:26 -0600 |
---|---|---|
committer | Matt Beall <matt.beall@greypointcorp.com> | 2015-03-31 10:52:26 -0600 |
commit | fa9f7075fa42197e2daed6513647d07761dde090 (patch) | |
tree | bdbd61c82b5bf361bf376f477586ee0d96f3a45e /src/modules | |
parent | ce9f46d4e75678729e014b3f94f01875acac2322 (diff) | |
download | px4-firmware-fa9f7075fa42197e2daed6513647d07761dde090.tar.gz px4-firmware-fa9f7075fa42197e2daed6513647d07761dde090.tar.bz2 px4-firmware-fa9f7075fa42197e2daed6513647d07761dde090.zip |
Changed message staging
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/mavlink/mavlink_receiver.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/mavlink/mavlink_receiver.cpp b/src/modules/mavlink/mavlink_receiver.cpp index 1f91654da..3f9f7e139 100644 --- a/src/modules/mavlink/mavlink_receiver.cpp +++ b/src/modules/mavlink/mavlink_receiver.cpp @@ -955,9 +955,11 @@ MavlinkReceiver::handle_message_ping(mavlink_message_t *msg) { mavlink_ping_t ping; mavlink_msg_ping_decode( msg, &ping); - if (mavlink_system.sysid == ping.target_system && - mavlink_system.compid == ping.target_component) { - _mavlink->send_message(MAVLINK_MSG_ID_PING, &msg); + if ((mavlink_system.sysid == ping.target_system) && + (mavlink_system.compid == ping.target_component)) { + mavlink_message_t msg_out; + mavlink_msg_ping_encode(_mavlink->get_system_id(), _mavlink->get_component_id(), &msg_out, &ping); + _mavlink->send_message(MAVLINK_MSG_ID_PING, &msg_out); } } |