From 739d1cfd3fe9ede871050b9c71f668ed92fcaede Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Tue, 17 May 2016 10:54:48 -0400 Subject: [PATCH] navigator: always run the loop, even without GPS If the navigator stops when no more position updates arrive, it won't switch to land mode when DESCEND is requested by the commander. --- src/modules/navigator/navigator_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/navigator/navigator_main.cpp b/src/modules/navigator/navigator_main.cpp index e74e75905e..c8b321fd62 100644 --- a/src/modules/navigator/navigator_main.cpp +++ b/src/modules/navigator/navigator_main.cpp @@ -338,10 +338,10 @@ Navigator::task_main() if (pret == 0) { /* timed out - periodic check for _task_should_exit, etc. */ if (global_pos_available_once) { - PX4_WARN("no GPS - navigator timed out"); global_pos_available_once = false; + PX4_WARN("navigator: global position timeout"); } - continue; + /* Let the loop run anyway, don't do `continue` here. */ } else if (pret < 0) { /* this is undesirable but not much we can do - might want to flag unhappy status */