From 5a189f3c4a8b2f599c10d9277f5d11e77c01b367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Fri, 19 Jan 2018 10:43:33 +0100 Subject: [PATCH] vmount mavlink input: rate-limit vehicle_command topic --- src/drivers/vmount/input_mavlink.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/drivers/vmount/input_mavlink.cpp b/src/drivers/vmount/input_mavlink.cpp index 29c205cf50..a8dc521e67 100644 --- a/src/drivers/vmount/input_mavlink.cpp +++ b/src/drivers/vmount/input_mavlink.cpp @@ -202,6 +202,11 @@ int InputMavlinkCmdMount::initialize() return -errno; } + // rate-limit inputs to 100Hz. If we don't do this and the output is configured to mavlink mode, + // it will publish vehicle_command's as well, causing the input poll() in here to return + // immediately, which in turn will cause an output update and thus a busy loop. + orb_set_interval(_vehicle_command_sub, 10); + return 0; }