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:
Beat Küng
2020-08-13 08:20:57 +02:00
committed by Daniel Agar
parent 3dad79d8f5
commit 3606f86518
@@ -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