mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Changed message staging
This commit is contained in:
parent
ce9f46d4e7
commit
fa9f7075fa
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user