control_allocator: make effective source name a class member

This commit is contained in:
Beat Küng
2021-12-24 20:06:13 -05:00
committed by Daniel Agar
parent 20d96f3bd9
commit 9c767ff1ee
5 changed files with 13 additions and 16 deletions
@@ -103,6 +103,11 @@ public:
*/
virtual int numActuators() const = 0;
/**
* Display name
*/
virtual const char *name() const = 0;
protected:
matrix::Vector<float, NUM_ACTUATORS> _trim; ///< Actuator trim
FlightPhase _flight_phase{FlightPhase::HOVER_FLIGHT}; ///< Current flight phase
@@ -79,6 +79,8 @@ public:
bool getEffectivenessMatrix(matrix::Matrix<float, NUM_AXES, NUM_ACTUATORS> &matrix, bool force) override;
int numActuators() const override { return _num_actuators; }
const char *name() const override { return "Multirotor"; }
private:
bool _updated{true};
int _num_actuators{0};
@@ -59,6 +59,8 @@ public:
void setFlightPhase(const FlightPhase &flight_phase) override;
int numActuators() const override { return 7; }
const char *name() const override { return "Standard VTOL"; }
protected:
bool _updated{true};
};
@@ -59,6 +59,8 @@ public:
void setFlightPhase(const FlightPhase &flight_phase) override;
int numActuators() const override { return 10; }
const char *name() const override { return "VTOL Tiltrotor"; }
protected:
bool _updated{true};
};