HAL_SITL: make model name case insensitive

This commit is contained in:
Andrew Tridgell 2015-05-22 16:04:11 +10:00
parent d734e700fc
commit 6cbd291dd2
1 changed files with 1 additions and 1 deletions

View File

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