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: Roman <bapstroman@gmail.com>
This commit is contained in:
Roman
2016-11-22 10:05:53 +01:00
committed by Julian Oes
parent d77547e7e1
commit f8f12ee265
2 changed files with 3 additions and 9 deletions
@@ -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;