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:
Beat Küng
2018-05-07 13:16:53 +02:00
parent 9772380779
commit 13ab5ed0d0
16 changed files with 43 additions and 31 deletions
+3 -2
View File
@@ -134,7 +134,7 @@ public:
/**
* task spawn trampoline for the secondary GPS
*/
static void run_trampoline_secondary(int argc, char *argv[]);
static int run_trampoline_secondary(int argc, char *argv[]);
/** @see ModuleBase::run() */
void run() override;
@@ -997,7 +997,7 @@ int GPS::task_spawn(int argc, char *argv[], Instance instance)
return 0;
}
void GPS::run_trampoline_secondary(int argc, char *argv[])
int GPS::run_trampoline_secondary(int argc, char *argv[])
{
#ifdef __PX4_NUTTX
@@ -1014,6 +1014,7 @@ void GPS::run_trampoline_secondary(int argc, char *argv[])
_secondary_instance = nullptr;
delete gps;
}
return 0;
}
GPS *GPS::instantiate(int argc, char *argv[])
{