mirror of https://github.com/ArduPilot/ardupilot
GCS_MAVLink: respect txbuf flow control for FTP messages
This gives slow radio links a fighting chance of getting FTP bulk download working even when they use a baud rate which is much higher than their current bandwidth. This should eliminate the need to disable FTP for parameter download on slow to moderate speed radio links like mLRS and ELRS. It allows removal of a hack in mLRS which results in a decrease in parameter download time for 19 Hz mLRS from 45-60 seconds to 11-17 seconds. This should also be good news for the ELRS rc-mavlink branch.
This commit is contained in:
parent
cadd121401
commit
0e47599bb1
|
@ -105,7 +105,7 @@ bool GCS_MAVLINK::send_ftp_reply(const pending_ftp &reply)
|
|||
send_banner();
|
||||
}
|
||||
WITH_SEMAPHORE(comm_chan_lock(reply.chan));
|
||||
if (!HAVE_PAYLOAD_SPACE(chan, FILE_TRANSFER_PROTOCOL)) {
|
||||
if (!HAVE_PAYLOAD_SPACE(chan, FILE_TRANSFER_PROTOCOL) || get_last_txbuf() < 33) {
|
||||
return false;
|
||||
}
|
||||
uint8_t payload[251] = {};
|
||||
|
|
Loading…
Reference in New Issue