mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 09:17:35 +08:00
Fix system boot commandline handling
This commit is contained in:
@@ -75,6 +75,7 @@ extern "C" {
|
||||
{
|
||||
cout.flush();
|
||||
cout << endl << "floating point exception" << endl;
|
||||
PX4_BACKTRACE();
|
||||
cout.flush();
|
||||
}
|
||||
}
|
||||
@@ -102,14 +103,17 @@ static void run_cmd(const vector<string> &appargs, bool exit_on_fail)
|
||||
}
|
||||
|
||||
arg[i] = (char *)0;
|
||||
|
||||
if (exit_on_fail) {
|
||||
cout << endl;
|
||||
}
|
||||
|
||||
int retval = apps[command](i, (char **)arg);
|
||||
|
||||
if (exit_on_fail && retval) {
|
||||
exit(retval);
|
||||
}
|
||||
|
||||
usleep(65000);
|
||||
|
||||
} else if (command.compare("help") == 0) {
|
||||
list_builtins();
|
||||
|
||||
@@ -117,11 +121,13 @@ static void run_cmd(const vector<string> &appargs, bool exit_on_fail)
|
||||
// Do nothing
|
||||
|
||||
} else {
|
||||
cout << "Invalid command: " << command << "\ntype 'help' for a list of commands" << endl;
|
||||
cout << endl << "Invalid command: " << command << "\ntype 'help' for a list of commands" << endl;
|
||||
|
||||
}
|
||||
|
||||
print_prompt();
|
||||
if (exit_on_fail) {
|
||||
print_prompt();
|
||||
}
|
||||
}
|
||||
|
||||
static void usage()
|
||||
|
||||
Reference in New Issue
Block a user