mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 16:58:54 +08:00
FlightTaskManual: define as abstract class
This commit is contained in:
committed by
Beat Küng
parent
46f0a14c28
commit
3b4870b2c2
@@ -41,8 +41,8 @@ int FlightTasks::switchTask(int task_number)
|
||||
|
||||
switch (task_number) {
|
||||
case 0:
|
||||
_current_task = new (&_task_union.manual) FlightTaskManual(this, "MAN");
|
||||
break;
|
||||
/* This part will change with the next PR that uses enum */
|
||||
return -1;
|
||||
|
||||
case 1:
|
||||
_current_task = new (&_task_union.orbit) FlightTaskOrbit(this, "ORB");
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "tasks/FlightTask.hpp"
|
||||
#include "tasks/FlightTaskManual.hpp"
|
||||
#include "tasks/FlightTaskManualAltitude.hpp"
|
||||
#include "tasks/FlightTaskManualPosition.hpp"
|
||||
#include "tasks/FlightTaskManualStabilized.hpp"
|
||||
@@ -122,7 +121,6 @@ private:
|
||||
TaskUnion() {}
|
||||
~TaskUnion() {}
|
||||
|
||||
FlightTaskManual manual;
|
||||
FlightTaskManualStabilized stabilized;
|
||||
FlightTaskManualAltitude altitude;
|
||||
FlightTaskManualPosition position;
|
||||
|
||||
@@ -83,15 +83,6 @@ bool FlightTaskManual::updateInitialize()
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool FlightTaskManual::update()
|
||||
{
|
||||
/* Nothing to do.
|
||||
* The only purpose of this class
|
||||
* is to provide sticks to child classes.
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FlightTaskManual::_evaluateSticks()
|
||||
{
|
||||
/* Sticks are rescaled linearly and exponentially from [0,1] to [-1,1] */
|
||||
|
||||
@@ -59,8 +59,6 @@ public:
|
||||
|
||||
bool updateInitialize() override;
|
||||
|
||||
bool update() override;
|
||||
|
||||
protected:
|
||||
|
||||
bool _sticks_data_required = true; /**< let inherited task-class define if it depends on stick data */
|
||||
|
||||
Reference in New Issue
Block a user