mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 01:33:33 +08:00
gps driver: Use correct spawn command, use a smaller start tool size
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013 PX4 Development Team. All rights reserved.
|
* Copyright (c) 2013, 2014 PX4 Development Team. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -56,6 +56,7 @@
|
|||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
#include <drivers/drv_hrt.h>
|
#include <drivers/drv_hrt.h>
|
||||||
#include <drivers/device/i2c.h>
|
#include <drivers/device/i2c.h>
|
||||||
|
#include <systemlib/systemlib.h>
|
||||||
#include <systemlib/perf_counter.h>
|
#include <systemlib/perf_counter.h>
|
||||||
#include <systemlib/scheduling_priorities.h>
|
#include <systemlib/scheduling_priorities.h>
|
||||||
#include <systemlib/err.h>
|
#include <systemlib/err.h>
|
||||||
@@ -78,12 +79,6 @@
|
|||||||
#endif
|
#endif
|
||||||
static const int ERROR = -1;
|
static const int ERROR = -1;
|
||||||
|
|
||||||
#ifndef CONFIG_SCHED_WORKQUEUE
|
|
||||||
# error This requires CONFIG_SCHED_WORKQUEUE.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class GPS : public device::CDev
|
class GPS : public device::CDev
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -211,7 +206,8 @@ GPS::init()
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* start the GPS driver worker task */
|
/* start the GPS driver worker task */
|
||||||
_task = task_create("gps", SCHED_PRIORITY_SLOW_DRIVER, 2048, (main_t)&GPS::task_main_trampoline, nullptr);
|
_task = task_spawn_cmd("gps", SCHED_DEFAULT,
|
||||||
|
SCHED_PRIORITY_SLOW_DRIVER, 2000, (main_t)&GPS::task_main_trampoline, nullptr);
|
||||||
|
|
||||||
if (_task < 0) {
|
if (_task < 0) {
|
||||||
warnx("task start failed: %d", errno);
|
warnx("task start failed: %d", errno);
|
||||||
|
|||||||
@@ -41,3 +41,5 @@ SRCS = gps.cpp \
|
|||||||
gps_helper.cpp \
|
gps_helper.cpp \
|
||||||
mtk.cpp \
|
mtk.cpp \
|
||||||
ubx.cpp
|
ubx.cpp
|
||||||
|
|
||||||
|
MODULE_STACKSIZE = 1200
|
||||||
|
|||||||
Reference in New Issue
Block a user