Skip to content
Snippets Groups Projects
Commit f8f12ee2 authored by Roman's avatar Roman Committed by Julian Oes
Browse files

vtol_att_control: removed unnecessary pointers to derived classes


- we interface over the base class pointer so we don't need any pointers
to the derived classes of VtolType

Signed-off-by: default avatarRoman <bapstroman@gmail.com>
parent d77547e7
No related branches found
No related tags found
No related merge requests found
......@@ -137,16 +137,13 @@ VtolAttitudeControl::VtolAttitudeControl() :
parameters_update();
if (_params.vtol_type == vtol_type::TAILSITTER) {
_tailsitter = new Tailsitter(this);
_vtol_type = _tailsitter;
_vtol_type = new Tailsitter(this);
} else if (_params.vtol_type == vtol_type::TILTROTOR) {
_tiltrotor = new Tiltrotor(this);
_vtol_type = _tiltrotor;
_vtol_type = new Tiltrotor(this);
} else if (_params.vtol_type == vtol_type::STANDARD) {
_standard = new Standard(this);
_vtol_type = _standard;
_vtol_type = new Standard(this);
} else {
_task_should_exit = true;
......
......@@ -219,9 +219,6 @@ private:
bool _abort_front_transition;
VtolType *_vtol_type = nullptr; // base class for different vtol types
Tiltrotor *_tiltrotor = nullptr; // tailsitter vtol type
Tailsitter *_tailsitter = nullptr; // tiltrotor vtol type
Standard *_standard = nullptr; // standard vtol type
//*****************Member functions***********************************************************************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment