Commit Graph

9 Commits

Author SHA1 Message Date
RomanBapst 43d006aff2 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>
2019-08-05 12:07:05 +02:00
RomanBapst 807cfc8aac mavlink: fix race condition in mavlink_command_sender
- if we receive an ack for a command through a specific mavlink channel
then do not drop the corresponding command in the queue if this specific
mavlink channel did not issue the command. If we don't do this we can
end up in a situation where we associate an ack coming through a specific
mavlink channel to a command in the queue which was not requested by this mavlink channel.
Moreover, the actual command for which the ack was meant remains in the
queue and eventually triggers a timeout.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-08-05 12:07:05 +02:00
Daniel Agar a99f75dde2 Mavlink set last sent timestamp to space out initial publication
- remove QURT defines no longer required
2018-06-09 13:38:44 +02:00
Daniel Agar b70b8288b9 px4_includes cleanup incomplete list 2017-08-20 20:42:42 +02:00
Julian Oes ba150566c6 mavlink_command_sender: add some log printfs
This improves the printfs which will be logged. This should improve to
debug the camera triggering. The debug printfs are disabled by default.
2017-08-16 09:47:50 +02:00
Lorenz Meier 8d8174ea0c MAVLink command retransmission: Reduce RAM footprint and make debug output optional 2017-07-08 12:46:28 +02:00
Julian Oes 1576094d9f mavlink_command_sender: use const ref 2017-07-08 11:52:23 +02:00
Julian Oes 893b7b5d46 mavlink_command_sender: instantiate in initialize 2017-07-08 11:52:23 +02:00
Julian Oes af0107ae0a mavlink: add class for command retransmission
This adds a class to allow for retransmission of outgoing commands.
The sent commands are kept in a timestamped list to check if they are
acked as required by the mavlink protocol.
If they are not acked within a timeout, they can be retransmitted.
2017-07-08 11:52:23 +02:00