From 93c200d281e7488db95806840a6976b02d1afbe0 Mon Sep 17 00:00:00 2001 From: px4dev Date: Mon, 1 Oct 2012 00:02:38 -0700 Subject: Add new 'task_spawn' interface for starting new tasks in the PX4 world --- apps/fixedwing_control/fixedwing_control.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'apps/fixedwing_control') diff --git a/apps/fixedwing_control/fixedwing_control.c b/apps/fixedwing_control/fixedwing_control.c index beabc1142..81ec4ca0b 100644 --- a/apps/fixedwing_control/fixedwing_control.c +++ b/apps/fixedwing_control/fixedwing_control.c @@ -60,6 +60,7 @@ #include #include #include +#include #include static bool thread_should_exit = false; /**< Deamon exit flag */ @@ -414,7 +415,12 @@ int fixedwing_control_main(int argc, char *argv[]) } thread_should_exit = false; - deamon_task = task_create("fixedwing_control", SCHED_PRIORITY_MAX - 20, 4096, fixedwing_control_thread_main, (argv) ? (const char **)&argv[2] : (const char **)NULL); + deamon_task = task_spawn("fixedwing_control", + SCHED_RR, + SCHED_PRIORITY_MAX - 20, + 4096, + fixedwing_control_thread_main, + (argv) ? (const char **)&argv[2] : (const char **)NULL); thread_running = true; exit(0); } -- cgit v1.2.3