Browse Source

ActuatorEffectivenessRotors: add missing getEffectivenessMatrix

Fixes MOTORS_6DOF
main
Beat Küng 3 years ago committed by Daniel Agar
parent
commit
4338976247
  1. 11
      src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.cpp
  2. 4
      src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.hpp

11
src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.cpp

@ -262,3 +262,14 @@ uint32_t ActuatorEffectivenessRotors::getUpwardsMotors() const @@ -262,3 +262,14 @@ uint32_t ActuatorEffectivenessRotors::getUpwardsMotors() const
return upwards_motors;
}
bool
ActuatorEffectivenessRotors::getEffectivenessMatrix(Configuration &configuration,
EffectivenessUpdateReason external_update)
{
if (external_update == EffectivenessUpdateReason::NO_EXTERNAL_UPDATE) {
return false;
}
return addActuators(configuration);
}

4
src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessRotors.hpp

@ -81,6 +81,8 @@ public: @@ -81,6 +81,8 @@ public:
bool tilt_support = false);
virtual ~ActuatorEffectivenessRotors() = default;
bool getEffectivenessMatrix(Configuration &configuration, EffectivenessUpdateReason external_update) override;
void getDesiredAllocationMethod(AllocationMethod allocation_method_out[MAX_NUM_MATRICES]) const override
{
allocation_method_out[0] = AllocationMethod::SEQUENTIAL_DESATURATION;
@ -96,7 +98,7 @@ public: @@ -96,7 +98,7 @@ public:
bool addActuators(Configuration &configuration);
const char *name() const override { return "Multirotor"; }
const char *name() const override { return "Rotors"; }
/**
* Sets the motor axis from tilt configurations and current tilt control.

Loading…
Cancel
Save