forked from Archive/PX4-Autopilot
Abort on large packets which do not fit in buffer - not just if the gap is not provided any more.
This commit is contained in:
parent
d5b8385a13
commit
2e33683630
|
@ -763,7 +763,7 @@ Mavlink::send_message(const uint8_t msgid, const void *msg)
|
||||||
_last_write_try_time = hrt_absolute_time();
|
_last_write_try_time = hrt_absolute_time();
|
||||||
|
|
||||||
/* check if there is space in the buffer, let it overflow else */
|
/* check if there is space in the buffer, let it overflow else */
|
||||||
if (buf_free < TX_BUFFER_GAP) {
|
if ((buf_free < TX_BUFFER_GAP) || (buf_free < packet_len)) {
|
||||||
/* no enough space in buffer to send */
|
/* no enough space in buffer to send */
|
||||||
count_txerr();
|
count_txerr();
|
||||||
count_txerrbytes(packet_len);
|
count_txerrbytes(packet_len);
|
||||||
|
|
Loading…
Reference in New Issue