flight tasks: use placement new to reduce memory overhead and the need for dynamic allocations

In addition, we will need some shared data structure for the uorb
subscriptions.
This commit is contained in:
Beat Küng
2017-11-20 21:27:32 +01:00
parent 99eb051c0f
commit b5ecf9824d
6 changed files with 86 additions and 96 deletions
@@ -45,21 +45,14 @@
using namespace matrix;
int FlightTaskOrbit::activate()
FlightTaskOrbit::FlightTaskOrbit(SuperBlock *parent, const char *name) :
FlightTaskManual(parent, name)
{
FlightTask::activate();
_r = 1.f;
_v = 0.5f;
_z = _position(2);
_center = Vector2f(_position.data());
_center(0) -= _r;
return 0;
}
int FlightTaskOrbit::disable()
{
FlightTask::disable();
return 0;
}
int FlightTaskOrbit::update()