forked from Archive/PX4-Autopilot
POSIX: added separators between commands run from shell
Output a separator and the command called to make the ouput easier to read. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
parent
58a33dd26a
commit
a284a7b6d9
|
@ -53,6 +53,7 @@ typedef int (*px4_main_t)(int argc, char *argv[]);
|
|||
static void run_cmd(const vector<string> &appargs) {
|
||||
// command is appargs[0]
|
||||
string command = appargs[0];
|
||||
cout << "----------------------------------\n";
|
||||
if (apps.find(command) != apps.end()) {
|
||||
const char *arg[appargs.size()+2];
|
||||
|
||||
|
@ -62,11 +63,12 @@ static void run_cmd(const vector<string> &appargs) {
|
|||
++i;
|
||||
}
|
||||
arg[i] = (char *)0;
|
||||
cout << "Running: " << command << "\n";
|
||||
apps[command](i,(char **)arg);
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "Invalid command" << endl;
|
||||
cout << "Invalid command: " << command << endl;
|
||||
list_builtins();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue