mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 11:06:04 +08:00
mavlink: check TX buffer before processing command ack
This commit is contained in:
committed by
Lorenz Meier
parent
8d5813994f
commit
a66cb0cbaf
@@ -2336,6 +2336,8 @@ Mavlink::task_main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* send command ACK */
|
/* send command ACK */
|
||||||
uint16_t current_command_ack = 0;
|
uint16_t current_command_ack = 0;
|
||||||
|
|
||||||
|
if (ack_sub.updated() && (get_free_tx_buf() >= MAVLINK_MSG_ID_COMMAND_ACK_LEN + MAVLINK_NUM_NON_PAYLOAD_BYTES)) {
|
||||||
vehicle_command_ack_s command_ack;
|
vehicle_command_ack_s command_ack;
|
||||||
|
|
||||||
if (ack_sub.update(&command_ack)) {
|
if (ack_sub.update(&command_ack)) {
|
||||||
@@ -2356,6 +2358,7 @@ Mavlink::task_main(int argc, char *argv[])
|
|||||||
//_transmitting_enabled = _transmitting_enabled_temp;
|
//_transmitting_enabled = _transmitting_enabled_temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* check for shell output */
|
/* check for shell output */
|
||||||
if (_mavlink_shell && _mavlink_shell->available() > 0) {
|
if (_mavlink_shell && _mavlink_shell->available() > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user