aboutsummaryrefslogtreecommitdiff
path: root/apps/px4
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2012-10-01 00:02:38 -0700
committerpx4dev <px4@purgatory.org>2012-10-01 00:02:38 -0700
commit93c200d281e7488db95806840a6976b02d1afbe0 (patch)
tree606a24e6778f54c3d7fa9939f303d89f76161d4e /apps/px4
parent6005077d54e6b96a5284752eedbd026ef7952341 (diff)
downloadpx4-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/px4')
-rw-r--r--apps/px4/fmu/fmu.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/px4/fmu/fmu.cpp b/apps/px4/fmu/fmu.cpp
index 48d338c99..eeef2f914 100644
--- a/apps/px4/fmu/fmu.cpp
+++ b/apps/px4/fmu/fmu.cpp
@@ -66,6 +66,8 @@
#include <uORB/topics/actuator_controls.h>
#include <uORB/topics/actuator_outputs.h>
+#include <systemlib/systemlib.h>
+
class FMUServo : public device::CDev
{
public:
@@ -169,7 +171,12 @@ FMUServo::init()
return ret;
/* start the IO interface task */
- _task = task_create("fmuservo", SCHED_PRIORITY_DEFAULT, 1024, (main_t)&FMUServo::task_main_trampoline, nullptr);
+ _task = task_spawn("fmuservo",
+ SCHED_RR,
+ SCHED_PRIORITY_DEFAULT,
+ 1024,
+ (main_t)&FMUServo::task_main_trampoline,
+ nullptr);
if (_task < 0) {
debug("task start failed: %d", errno);