From ce4c4c43dcf642c96f08eabd84ccc14594909723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mayoral=20Vilches?= Date: Sun, 19 Oct 2014 18:40:08 -0700 Subject: [PATCH] AP_HAL_Linux: Scheduler reboot fix exit from the autpilot when reboot is commanded. The software assumes that the code is being launched in an infinite loop thereby an exit will make it reboot. --- libraries/AP_HAL_Linux/Scheduler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_HAL_Linux/Scheduler.cpp b/libraries/AP_HAL_Linux/Scheduler.cpp index 02b3e3394e..97e0bec2d4 100644 --- a/libraries/AP_HAL_Linux/Scheduler.cpp +++ b/libraries/AP_HAL_Linux/Scheduler.cpp @@ -384,7 +384,7 @@ void LinuxScheduler::system_initialized() void LinuxScheduler::reboot(bool hold_in_bootloader) { - for(;;); + exit(1); } void LinuxScheduler::stop_clock(uint64_t time_usec)