mirror of https://github.com/ArduPilot/ardupilot
AP_HAL_SITL: remove home_str from constructor
No Aircraft was actually using this in the constructor, so it's really adding overhead for no good reason.
This commit is contained in:
parent
1b3e2e3c8b
commit
cdab58d598
|
@ -96,7 +96,7 @@ void SITL_State::_usage(void)
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
const char *name;
|
const char *name;
|
||||||
Aircraft *(*constructor)(const char *home_str, const char *frame_str);
|
Aircraft *(*constructor)(const char *frame_str);
|
||||||
} model_constructors[] = {
|
} model_constructors[] = {
|
||||||
{ "quadplane", QuadPlane::create },
|
{ "quadplane", QuadPlane::create },
|
||||||
{ "xplane", XPlane::create },
|
{ "xplane", XPlane::create },
|
||||||
|
@ -372,7 +372,8 @@ void SITL_State::_parse_command_line(int argc, char * const argv[])
|
||||||
for (uint8_t i=0; i < ARRAY_SIZE(model_constructors); i++) {
|
for (uint8_t i=0; i < ARRAY_SIZE(model_constructors); i++) {
|
||||||
if (strncasecmp(model_constructors[i].name, model_str, strlen(model_constructors[i].name)) == 0) {
|
if (strncasecmp(model_constructors[i].name, model_str, strlen(model_constructors[i].name)) == 0) {
|
||||||
printf("Creating model %s at speed %.1f\n", model_str, speedup);
|
printf("Creating model %s at speed %.1f\n", model_str, speedup);
|
||||||
sitl_model = model_constructors[i].constructor(home_str, model_str);
|
sitl_model = model_constructors[i].constructor(model_str);
|
||||||
|
sitl_model->set_start_location(home_str);
|
||||||
sitl_model->set_interface_ports(simulator_address, simulator_port_in, simulator_port_out);
|
sitl_model->set_interface_ports(simulator_address, simulator_port_in, simulator_port_out);
|
||||||
sitl_model->set_speedup(speedup);
|
sitl_model->set_speedup(speedup);
|
||||||
sitl_model->set_instance(_instance);
|
sitl_model->set_instance(_instance);
|
||||||
|
|
Loading…
Reference in New Issue