gps: fix thread initialization under posix

under NuttX the argc in task_main_trampoline contains two arguments,
but on linux only one.
This commit is contained in:
Beat Küng 2016-05-11 14:55:19 +02:00 committed by Lorenz Meier
parent 9d0c5469a0
commit 47ed8c1a3c
1 changed files with 2 additions and 1 deletions

View File

@ -297,6 +297,7 @@ int GPS::init()
if (_task < 0) {
PX4_WARN("task start failed: %d", errno);
_task = -1;
return -errno;
}
@ -305,7 +306,7 @@ int GPS::init()
void GPS::task_main_trampoline(int argc, char *argv[])
{
g_dev[argv[1][0] - '1']->task_main();
g_dev[argv[argc - 1][0] - '1']->task_main();
}
int GPS::callback(GPSCallbackType type, void *data1, int data2, void *user)