refactor control_allocator: directly get the effectiveness matrix when updated

Reduces stack + RAM usage
This commit is contained in:
Beat Küng
2021-01-18 11:25:37 -05:00
committed by Daniel Agar
parent 38782029ad
commit 308f614735
9 changed files with 164 additions and 208 deletions
@@ -49,12 +49,7 @@ public:
ActuatorEffectivenessStandardVTOL();
virtual ~ActuatorEffectivenessStandardVTOL() = default;
/**
* Update effectiveness matrix
*
* @return True if the effectiveness matrix has changed
*/
virtual bool update() override;
bool getEffectivenessMatrix(matrix::Matrix<float, NUM_AXES, NUM_ACTUATORS> &matrix) override;
/**
* Set the current flight phase
@@ -64,5 +59,5 @@ public:
void setFlightPhase(const FlightPhase &flight_phase) override;
protected:
bool _updated{false};
bool _updated{true};
};