mavlink_command_sender: don't try to resend command to instance which

did not request this command

Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
RomanBapst
2019-07-26 13:46:17 +02:00
committed by Beat Küng
parent 807cfc8aac
commit 71791fa8f8
@@ -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]++;