mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 01:43:35 +08:00
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>
This commit is contained in:
@@ -81,7 +81,8 @@ public:
|
||||
* Handle mavlink command_ack.
|
||||
* thread-safe
|
||||
*/
|
||||
void handle_mavlink_command_ack(const mavlink_command_ack_t &ack, uint8_t from_sysid, uint8_t from_compid);
|
||||
void handle_mavlink_command_ack(const mavlink_command_ack_t &ack, uint8_t from_sysid, uint8_t from_compid,
|
||||
uint8_t channel);
|
||||
|
||||
private:
|
||||
MavlinkCommandSender() = default;
|
||||
|
||||
Reference in New Issue
Block a user