Skip to content
Snippets Groups Projects
Commit 47ed8c1a authored by Beat Küng's avatar Beat Küng Committed by Lorenz Meier
Browse files

gps: fix thread initialization under posix

under NuttX the argc in task_main_trampoline contains two arguments,
but on linux only one.
parent 9d0c5469
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment