Browse Source

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.
sbg
Julian Oes 9 years ago committed by Lorenz Meier
parent
commit
739d1cfd3f
  1. 4
      src/modules/navigator/navigator_main.cpp

4
src/modules/navigator/navigator_main.cpp

@ -338,10 +338,10 @@ Navigator::task_main() @@ -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 */

Loading…
Cancel
Save