From 44520522ac113f664393c2bb94334df6d8c2850d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= <beat-kueng@gmx.net> Date: Tue, 6 Sep 2016 11:39:22 +0200 Subject: [PATCH] vmount: make sure the test command works, even if MNT_MODE_IN is 0 --- src/drivers/vmount/vmount.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/vmount/vmount.cpp b/src/drivers/vmount/vmount.cpp index 4dd36fb25b..9acee57afe 100644 --- a/src/drivers/vmount/vmount.cpp +++ b/src/drivers/vmount/vmount.cpp @@ -198,7 +198,7 @@ static int vmount_thread_main(int argc, char *argv[]) while (!thread_should_exit) { - if (!thread_data.input_obj && params.mnt_mode_in != 0) { //need to initialize + if (!thread_data.input_obj && (params.mnt_mode_in != 0 || test_input)) { //need to initialize output_config.gimbal_normal_mode_value = params.mnt_ob_norm_mode; output_config.gimbal_retracted_mode_value = params.mnt_ob_lock_mode; @@ -273,7 +273,7 @@ static int vmount_thread_main(int argc, char *argv[]) } } - if (params.mnt_mode_in != 0) { + if (thread_data.input_obj) { //get input: we cannot make the timeout too large, because the output needs to update //periodically for stabilization and angle updates. -- GitLab