From 71791fa8f8afaac4b0d317e1c564aa525e10be32 Mon Sep 17 00:00:00 2001 From: RomanBapst Date: Fri, 26 Jul 2019 13:46:17 +0200 Subject: [PATCH] mavlink_command_sender: don't try to resend command to instance which did not request this command Signed-off-by: RomanBapst --- src/modules/mavlink/mavlink_command_sender.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/mavlink/mavlink_command_sender.cpp b/src/modules/mavlink/mavlink_command_sender.cpp index cc9b49b2a8..3ce060f9b3 100644 --- a/src/modules/mavlink/mavlink_command_sender.cpp +++ b/src/modules/mavlink/mavlink_command_sender.cpp @@ -172,7 +172,7 @@ void MavlinkCommandSender::check_timeout(mavlink_channel_t channel) } } - if (item->num_sent_per_channel[channel] < max_sent) { + if (item->num_sent_per_channel[channel] < max_sent && item->num_sent_per_channel[channel] != -1) { // We are behind and need to do a retransmission. mavlink_msg_command_long_send_struct(channel, &item->command); item->num_sent_per_channel[channel]++;