mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-20 21:01:36 +08:00
px4_main_t: fix method declaration throughout the code base
px4_main_t is defined as: typedef int (*px4_main_t)(int argc, char *argv[]); which matches with the definition in NuttX, given to task_create
This commit is contained in:
@@ -149,8 +149,9 @@ public:
|
||||
* @param argc start argument(s)
|
||||
* @param argv start argument(s)
|
||||
*/
|
||||
static void run_trampoline(int argc, char *argv[])
|
||||
static int run_trampoline(int argc, char *argv[])
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
#ifdef __PX4_NUTTX
|
||||
// on NuttX task_create() adds the task name as first argument
|
||||
@@ -166,9 +167,12 @@ public:
|
||||
|
||||
} else {
|
||||
PX4_ERR("failed to instantiate object");
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
exit_and_cleanup();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user