mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-05 06:03:02 +08:00
vmount: make sure the test command works, even if MNT_MODE_IN is 0
This commit is contained in:
@@ -198,7 +198,7 @@ static int vmount_thread_main(int argc, char *argv[])
|
|||||||
|
|
||||||
while (!thread_should_exit) {
|
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_normal_mode_value = params.mnt_ob_norm_mode;
|
||||||
output_config.gimbal_retracted_mode_value = params.mnt_ob_lock_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
|
//get input: we cannot make the timeout too large, because the output needs to update
|
||||||
//periodically for stabilization and angle updates.
|
//periodically for stabilization and angle updates.
|
||||||
|
|||||||
Reference in New Issue
Block a user