CA: add fixed-wing airmode

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2024-06-06 14:52:20 +02:00
parent 3370b4583a
commit d27ac8a2cb
6 changed files with 23 additions and 6 deletions
@@ -428,6 +428,9 @@ ControlAllocator::Run()
c[0](4) = _thrust_sp(1);
c[0](5) = _thrust_sp(2);
const int airmode = _flight_phase != ActuatorEffectiveness::FlightPhase::FORWARD_FLIGHT ? _param_mc_airmode.get() :
_param_ca_fw_dthr_airmd.get();
if (_num_control_allocation > 1) {
matrix::Vector<float, NUM_AXES> vehicle_torque_setpoint_matrix_1;
@@ -475,6 +478,7 @@ ControlAllocator::Run()
for (int i = 0; i < _num_control_allocation; ++i) {
_control_allocation[i]->setAirmode(airmode);
_control_allocation[i]->setControlSetpoint(c[i]);
// Do allocation