Adjustements and improvements in the simulation interface

This commit is contained in:
Lorenz Meier
2016-04-05 19:09:30 -07:00
parent 4d27239bb2
commit 0baa625681
3 changed files with 58 additions and 12 deletions
+8
View File
@@ -165,6 +165,10 @@ static void restore_term(void)
tcsetattr(0, TCSANOW, &orig_term);
}
bool px4_exit_requested(void) {
return _ExitFlag;
}
int main(int argc, char **argv)
{
bool daemon_mode = false;
@@ -237,6 +241,10 @@ int main(int argc, char **argv)
if (infile.is_open()) {
for (string line; getline(infile, line, '\n');) {
if (px4_exit_requested()) {
break;
}
// TODO: this should be true but for that we have to check all startup files
process_line(line, false);
}