mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-25 13:30:34 +08:00
control_allocator: ensure unused outputs are initialized to min
Mostly important in cases where the ouputs would change (e.g. param change)
This commit is contained in:
@@ -52,6 +52,10 @@ ControlAllocation::setEffectivenessMatrix(
|
||||
_control_trim = _effectiveness * _actuator_trim;
|
||||
_num_actuators = num_actuators;
|
||||
|
||||
// make sure unused actuators are initialized to min
|
||||
for (int i = num_actuators; i < NUM_ACTUATORS; ++i) {
|
||||
_actuator_sp(i) = _actuator_min(i);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user