mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 22:20:35 +08:00
ControlAllocation: update normalization scale only if matrix updated is forced
The forced flag is used to distinguish between updates due to a configuration (parameter) change (only enabled when disarmed), and matrix updates due to motor tilt change. Only update the normalization scale if the forced flag is true, and use a tilt angle of vertical position for it to have the scales tilt-invariant. Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -496,7 +496,7 @@ ControlAllocator::update_effectiveness_matrix_if_needed(bool force)
|
||||
// Assign control effectiveness matrix
|
||||
int total_num_actuators = config.num_actuators_matrix[i];
|
||||
_control_allocation[i]->setEffectivenessMatrix(config.effectiveness_matrices[i], config.trim[i],
|
||||
config.linearization_point[i], total_num_actuators);
|
||||
config.linearization_point[i], total_num_actuators, force);
|
||||
}
|
||||
|
||||
trims.timestamp = hrt_absolute_time();
|
||||
|
||||
Reference in New Issue
Block a user