Fixed the parsing of commander arguments for non-QURT builds

This commit is contained in:
bharathr 2016-05-19 13:14:35 -07:00 committed by Lorenz Meier
parent 723b501186
commit 250aab66ed
1 changed files with 6 additions and 0 deletions

View File

@ -1159,10 +1159,16 @@ int commander_thread_main(int argc, char *argv[])
if (argc > 2) {
#ifdef __PX4_QURT
if (!strcmp(argv[2],"-hil")) {
#else
if (!strcmp(argv[3],"-hil")) {
#endif
startup_in_hil = true;
} else {
#ifdef __PX4_QURT
PX4_ERR("Argument %s not supported.", argv[2]);
#else
PX4_ERR("Argument %s not supported.", argv[3]);
#endif
PX4_ERR("COMMANDER NOT STARTED");
thread_should_exit = true;
}