enable commander hil option when hils mode

test for merge...

recover modification part
This commit is contained in:
stmoon 2016-04-15 15:39:43 +09:00 committed by Lorenz Meier
parent 98443e8712
commit 717c90eab4
2 changed files with 8 additions and 3 deletions

View File

@ -330,7 +330,12 @@ then
sh /etc/init.d/rc.sensors
# Needs to be this early for in-air-restarts
commander start
if [ $OUTPUT_MODE == hil ]
then
commander start -hil
else
commander start
fi
#
# Start primary output

View File

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