mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 22:30:34 +08:00
control_allocator: change SequentialDesaturation to existing MC mixer
And limit the operations to the number of configured outputs. Only using the number of configured actuators reduces CPU load by ~2% on F7 @1khz.
This commit is contained in:
@@ -249,6 +249,10 @@ ControlAllocator::Run()
|
||||
parameter_update_s param_update;
|
||||
_parameter_update_sub.copy(¶m_update);
|
||||
|
||||
if (_control_allocation) {
|
||||
_control_allocation->updateParameters();
|
||||
}
|
||||
|
||||
updateParams();
|
||||
parameters_updated();
|
||||
}
|
||||
@@ -520,6 +524,7 @@ int ControlAllocator::print_status()
|
||||
const matrix::Matrix<float, NUM_AXES, NUM_ACTUATORS> &effectiveness = _control_allocation->getEffectivenessMatrix();
|
||||
PX4_INFO("Effectiveness.T =");
|
||||
effectiveness.T().print();
|
||||
PX4_INFO("Configured actuators: %i", _control_allocation->numConfiguredActuators());
|
||||
}
|
||||
|
||||
// Print perf
|
||||
|
||||
Reference in New Issue
Block a user