From 6b893a5865f7d8d2182ffda14230ba6ffd583ead Mon Sep 17 00:00:00 2001 From: Andrew Tridgell <tridge@samba.org> Date: Mon, 25 Aug 2014 22:19:21 +1000 Subject: [PATCH] GCS_MAVLink: slow down parameter send a lot with no flow control --- libraries/GCS_MAVLink/GCS_Common.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 45464586b..133b7f767 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -129,6 +129,12 @@ GCS_MAVLINK::queued_param_send() } count = bytes_allowed / (MAVLINK_MSG_ID_PARAM_VALUE_LEN + MAVLINK_NUM_NON_PAYLOAD_BYTES); + // when we don't have flow control we really need to keep the + // param download very slow, or it tends to stall + if (!have_flow_control() && count > 5) { + count = 5; + } + while (_queued_parameter != NULL && count--) { AP_Param *vp; float value; -- GitLab