From a989e796638256caf5acba403760673384a24d64 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Tue, 26 Nov 2013 15:25:27 +0100 Subject: [PATCH] Navigator: Don't try to go to next WP or loiter after landing, just stay in landing mode --- src/modules/navigator/navigator_main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/navigator/navigator_main.cpp b/src/modules/navigator/navigator_main.cpp index 399985442b..8bd786a7be 100644 --- a/src/modules/navigator/navigator_main.cpp +++ b/src/modules/navigator/navigator_main.cpp @@ -944,11 +944,16 @@ Navigator::reset_mission_item_reached() void Navigator::check_mission_item_reached() { - // warnx("checking mission item reached"); + /* don't check if mission item is already reached */ if (_mission_item_reached) { return; } + /* don't try to reach the landing mission, just stay in that mode */ + if (_mission_item_triplet.current.nav_cmd == MAV_CMD_NAV_LAND) { + return; + } + uint64_t now = hrt_absolute_time(); float orbit;