Use OS independent API for task creation/deletion

Calls to task_delete and task_spawn_cmd are now
px4_task_delete and px4_task_spawn_cmd respectively.

The px4_tasks.h header was added to the affected files
and incusions of nuttx/config.h were removed.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-04-20 10:49:44 -07:00
parent 51a71d54c6
commit ddb32742eb
32 changed files with 94 additions and 88 deletions
@@ -38,6 +38,7 @@
* @author Johan Jansen <jnsn.johan@gmail.com>
*/
#include <px4_tasks.h> //usleep
#include <unistd.h> //usleep
#include <stdio.h>
#include <string.h>
@@ -95,7 +96,7 @@ static void land_detector_stop()
/* if we have given up, kill it */
if (++i > 50) {
task_delete(_landDetectorTaskID);
px4_task_delete(_landDetectorTaskID);
break;
}
} while (land_detector_task->isRunning());
@@ -136,7 +137,7 @@ static int land_detector_start(const char *mode)
}
//Start new thread task
_landDetectorTaskID = task_spawn_cmd("land_detector",
_landDetectorTaskID = px4_task_spawn_cmd("land_detector",
SCHED_DEFAULT,
SCHED_PRIORITY_DEFAULT,
1000,