mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-17 22:40:35 +08:00
vmount: fix regression around stabilize flags
We use the stabilize param to set the input. Like this the input flags can be changed using the configure message later, and then eventually used in the output.
This commit is contained in:
@@ -345,16 +345,6 @@ static int vmount_thread_main(int argc, char *argv[])
|
||||
thread_should_exit = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (params.mnt_do_stab == 1) {
|
||||
thread_data.output_obj->set_stabilize(true, true, true);
|
||||
|
||||
} else if (params.mnt_do_stab == 2) {
|
||||
thread_data.output_obj->set_stabilize(false, false, true);
|
||||
|
||||
} else {
|
||||
thread_data.output_obj->set_stabilize(false, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (thread_data.input_objs_len > 0) {
|
||||
@@ -364,6 +354,17 @@ static int vmount_thread_main(int argc, char *argv[])
|
||||
|
||||
for (int i = 0; i < thread_data.input_objs_len; ++i) {
|
||||
|
||||
if (params.mnt_do_stab == 1) {
|
||||
thread_data.input_objs[i]->set_stabilize(true, true, true);
|
||||
|
||||
} else if (params.mnt_do_stab == 2) {
|
||||
thread_data.input_objs[i]->set_stabilize(false, false, true);
|
||||
|
||||
} else {
|
||||
thread_data.input_objs[i]->set_stabilize(false, false, false);
|
||||
}
|
||||
|
||||
|
||||
bool already_active = (last_active == i);
|
||||
|
||||
ControlData *control_data_to_check = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user