From 1c30b105855b87d089b4dda845e81f1cec7b1c2f Mon Sep 17 00:00:00 2001 From: baumanta Date: Thu, 28 Nov 2019 10:48:06 +0100 Subject: [PATCH] prevent vmount from publishing mount orientation if smart gimbal is attached --- src/modules/vmount/vmount.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/vmount/vmount.cpp b/src/modules/vmount/vmount.cpp index d70eee9d45..bc3cd63da4 100644 --- a/src/modules/vmount/vmount.cpp +++ b/src/modules/vmount/vmount.cpp @@ -357,7 +357,12 @@ static int vmount_thread_main(int argc, char *argv[]) break; } - thread_data.output_obj->publish(); + //only publish the mount orientation if the mode is not mavlink + //if the gimbal speaks mavlink it publishes its own orientation + if (params.mnt_mode_out != 1) { // 1 = MAVLINK + thread_data.output_obj->publish(); + } + } else { //wait for parameter changes. We still need to wake up regularily to check for thread exit requests