mavlink command sender: give channels more time to request command

- if a channel receives an ack for a command, do not immediately remove the
command item from the send queue but wait until the next ack timeout occurs.
This gives other mavlink channels time to try to put identical commands into
the send queue.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
RomanBapst
2019-08-05 12:07:05 +02:00
committed by Beat Küng
parent 71791fa8f8
commit 43d006aff2
2 changed files with 19 additions and 4 deletions
+1 -1
View File
@@ -109,7 +109,7 @@ private:
mavlink_command_long_t command = {};
hrt_abstime timestamp_us = 0;
hrt_abstime last_time_sent_us = 0;
int8_t num_sent_per_channel[MAX_MAVLINK_CHANNEL] = {-1, -1, -1, -1};
int8_t num_sent_per_channel[MAX_MAVLINK_CHANNEL] = {-1, -1, -1, -1}; // -1: channel did not request this command to be sent, -2: channel got an ack for this command
} command_item_t;
TimestampedList<command_item_t> _commands{3};