Browse Source

HAL_SITL: make model name case insensitive

master
Andrew Tridgell 10 years ago
parent
commit
6cbd291dd2
  1. 2
      libraries/AP_HAL_SITL/SITL_cmdline.cpp

2
libraries/AP_HAL_SITL/SITL_cmdline.cpp

@ -153,7 +153,7 @@ void SITL_State::_parse_command_line(int argc, char * const argv[]) @@ -153,7 +153,7 @@ void SITL_State::_parse_command_line(int argc, char * const argv[])
if (model_str && home_str) {
for (uint8_t i=0; i<sizeof(model_constructors)/sizeof(model_constructors[0]); i++) {
if (strncmp(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) {
sitl_model = model_constructors[i].constructor(home_str, model_str);
sitl_model->set_speedup(speedup);
sitl_model->set_instance(_instance);

Loading…
Cancel
Save