mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-12 22:40:36 +08:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user