mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 03:53:34 +08:00
Revert "vmount: fix new input getting lost in throttling"
This reverts commit b7404ad6c1.
This commit is contained in:
@@ -352,8 +352,6 @@ static int vmount_thread_main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
bool input_changed = false;
|
||||
|
||||
if (thread_data.input_objs_len > 0) {
|
||||
|
||||
//get input: we cannot make the timeout too large, because the output needs to update
|
||||
@@ -375,17 +373,11 @@ static int vmount_thread_main(int argc, char *argv[])
|
||||
if (control_data_to_check != nullptr || already_active) {
|
||||
control_data = control_data_to_check;
|
||||
last_active = i;
|
||||
|
||||
if (!already_active) {
|
||||
input_changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hrt_abstime now = hrt_absolute_time();
|
||||
// Rate-limit the update of outputs, unless we just changed inputs because we wouldn't
|
||||
// want to miss the new control data.
|
||||
if (now - last_output_update > 10000 || input_changed) {
|
||||
if (now - last_output_update > 10000) { // rate-limit the update of outputs
|
||||
last_output_update = now;
|
||||
|
||||
//update output
|
||||
|
||||
Reference in New Issue
Block a user