Skip to content
Snippets Groups Projects
Commit 29fb5089 authored by Dennis Mannhart's avatar Dennis Mannhart Committed by Lorenz Meier
Browse files

FlightTasks: construct all tasks in constructor

parent b1530d1a
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,18 @@
#include <uORB/topics/vehicle_command.h>
#include <uORB/topics/vehicle_command_ack.h>
FlightTasks::FlightTasks()
{
// initialize all flight-tasks
// currently this is required to get all parameters read
for (int i = 0; i < static_cast<int>(FlightTaskIndex::Count); i++) {
_initTask(static_cast<FlightTaskIndex>(i));
}
// disable all tasks
_initTask(FlightTaskIndex::None);
}
bool FlightTasks::update()
{
_updateCommand();
......
......@@ -76,7 +76,7 @@ enum class FlightTaskIndex : int {
class FlightTasks
{
public:
FlightTasks() = default;
FlightTasks();
~FlightTasks()
{
......
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