mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
mavlink: STATUSTEXT check TX buffer before sending
- Note the TX buffer size check is lazily ignoring the possibility of messages that span multiple Mavlink STATUSTEXT. This at least accommodates the calibration use case and it's no worse than before for longer messages.
This commit is contained in:
parent
e399dbc440
commit
4a6c90b8ea
@ -508,9 +508,9 @@ protected:
|
||||
|
||||
bool send() override
|
||||
{
|
||||
if (!_mavlink->get_logbuffer()->empty() && _mavlink->is_connected()) {
|
||||
if (!_mavlink->get_logbuffer()->empty() && _mavlink->is_connected() && _mavlink->get_free_tx_buf() >= get_size()) {
|
||||
|
||||
mavlink_log_s mavlink_log{};
|
||||
mavlink_log_s mavlink_log;
|
||||
|
||||
if (_mavlink->get_logbuffer()->get(&mavlink_log)) {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user