mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +08:00
simulator: handle ctrl-c during startup correctly
This makes sure the px4 process does not hang when Ctrl-C is pressed during startup.
This commit is contained in:
@@ -198,7 +198,7 @@ extern "C" {
|
|||||||
argv);
|
argv);
|
||||||
|
|
||||||
// now wait for the command to complete
|
// now wait for the command to complete
|
||||||
while (true) {
|
while (!px4_exit_requested()) {
|
||||||
if (Simulator::getInstance() && Simulator::getInstance()->isInitialized()) {
|
if (Simulator::getInstance() && Simulator::getInstance()->isInitialized()) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user