mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 16:43:34 +08:00
ModuleBase: instanciate -> instantiate
This commit is contained in:
@@ -159,7 +159,7 @@ public:
|
||||
static int task_spawn(int argc, char *argv[]);
|
||||
|
||||
/** @see ModuleBase */
|
||||
static PX4FMU *instanciate(int argc, char *argv[]);
|
||||
static PX4FMU *instantiate(int argc, char *argv[]);
|
||||
|
||||
/** @see ModuleBase */
|
||||
static int custom_command(int argc, char *argv[]);
|
||||
@@ -3337,7 +3337,7 @@ PX4FMU::fake(int argc, char *argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
PX4FMU *PX4FMU::instanciate(int argc, char *argv[])
|
||||
PX4FMU *PX4FMU::instantiate(int argc, char *argv[])
|
||||
{
|
||||
// No arguments to parse. We also know that we should run as task
|
||||
PX4FMU *dev = new PX4FMU(true);
|
||||
|
||||
@@ -236,7 +236,7 @@ void Logger::print_statistics()
|
||||
_max_dropout_duration = 0.f;
|
||||
}
|
||||
|
||||
Logger *Logger::instanciate(int argc, char *argv[])
|
||||
Logger *Logger::instantiate(int argc, char *argv[])
|
||||
{
|
||||
uint32_t log_interval = 3500;
|
||||
int log_buffer_size = 12 * 1024;
|
||||
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
static int task_spawn(int argc, char *argv[]);
|
||||
|
||||
/** @see ModuleBase */
|
||||
static Logger *instanciate(int argc, char *argv[]);
|
||||
static Logger *instantiate(int argc, char *argv[]);
|
||||
|
||||
/** @see ModuleBase */
|
||||
static int custom_command(int argc, char *argv[]);
|
||||
|
||||
@@ -76,7 +76,7 @@ extern pthread_mutex_t px4_modules_mutex;
|
||||
// set _task_id and return 0
|
||||
// on error return != 0 (and _task_id must be -1)
|
||||
}
|
||||
static T *instanciate(int argc, char *argv[]) {
|
||||
static T *instantiate(int argc, char *argv[]) {
|
||||
// this is called from within the new thread, from run_trampoline()
|
||||
// parse the arguments
|
||||
// create a new object T & return it
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
/**
|
||||
* Entry point for px4_task_spawn_cmd() if the module runs in its own thread.
|
||||
* It does:
|
||||
* - instanciate the object
|
||||
* - instantiate the object
|
||||
* - call run() on it to execute the main loop
|
||||
* - cleanup: delete the object
|
||||
* @param argc start argument(s)
|
||||
@@ -156,14 +156,14 @@ public:
|
||||
argv += 1;
|
||||
#endif
|
||||
|
||||
_object = T::instanciate(argc, argv);
|
||||
_object = T::instantiate(argc, argv);
|
||||
|
||||
if (_object) {
|
||||
T *object = (T *)_object;
|
||||
object->run();
|
||||
|
||||
} else {
|
||||
PX4_ERR("failed to instanciate object");
|
||||
PX4_ERR("failed to instantiate object");
|
||||
}
|
||||
|
||||
exit_and_cleanup();
|
||||
|
||||
Reference in New Issue
Block a user