diff options
author | px4dev <px4@purgatory.org> | 2012-10-01 00:02:38 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-10-01 00:02:38 -0700 |
commit | 93c200d281e7488db95806840a6976b02d1afbe0 (patch) | |
tree | 606a24e6778f54c3d7fa9939f303d89f76161d4e /apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c | |
parent | 6005077d54e6b96a5284752eedbd026ef7952341 (diff) | |
download | px4-firmware-93c200d281e7488db95806840a6976b02d1afbe0.tar.gz px4-firmware-93c200d281e7488db95806840a6976b02d1afbe0.tar.bz2 px4-firmware-93c200d281e7488db95806840a6976b02d1afbe0.zip |
Add new 'task_spawn' interface for starting new tasks in the PX4 world
Diffstat (limited to 'apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c')
-rw-r--r-- | apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c b/apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c index 867b484e1..e5907f961 100644 --- a/apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c +++ b/apps/attitude_estimator_ekf/attitude_estimator_ekf_main.c @@ -60,6 +60,8 @@ #include <uORB/topics/vehicle_attitude.h> #include <arch/board/up_hrt.h> +#include <systemlib/systemlib.h> + #include "codegen/attitudeKalmanfilter_initialize.h" #include "codegen/attitudeKalmanfilter.h" @@ -150,7 +152,12 @@ int attitude_estimator_ekf_main(int argc, char *argv[]) } thread_should_exit = false; - attitude_estimator_ekf_task = task_create("attitude_estimator_ekf", SCHED_PRIORITY_DEFAULT, 20000, attitude_estimator_ekf_thread_main, (argv) ? (const char **)&argv[2] : (const char **)NULL); + attitude_estimator_ekf_task = task_spawn("attitude_estimator_ekf", + SCHED_RR, + SCHED_PRIORITY_DEFAULT, + 20000, + attitude_estimator_ekf_thread_main, + (argv) ? (const char **)&argv[2] : (const char **)NULL); exit(0); } |