From 7884e0a3f7e8007d2ef3195a9e3aab95dec300eb Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Fri, 8 Mar 2024 11:40:14 +0100 Subject: [PATCH] Navigator: remove vtol_takeoff special handling for RTL (#22844) We had a special handling for RTL triggered in vtol_takeoff state. The idea is to wait until the VTOL Takeoff is completed and only then switch to RTL. On a second thought this special handling isn't really necessary and for the sake of simplicity should be removed. This also removes the side effect of the indicated flight mode after RTL being set to VTOL_Takeoff again. Signed-off-by: Silvan Fuhrer --- src/modules/navigator/navigator_main.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/modules/navigator/navigator_main.cpp b/src/modules/navigator/navigator_main.cpp index 30cf417c48..8e2f24e157 100644 --- a/src/modules/navigator/navigator_main.cpp +++ b/src/modules/navigator/navigator_main.cpp @@ -783,17 +783,7 @@ void Navigator::run() _pos_sp_triplet_published_invalid_once = false; } -#if CONFIG_MODE_NAVIGATOR_VTOL_TAKEOFF - - // If we are in VTOL takeoff, do not switch until it is finished. - if (_navigation_mode == &_vtol_takeoff && !get_mission_result()->finished) { - navigation_mode_new = &_vtol_takeoff; - - } else -#endif //CONFIG_MODE_NAVIGATOR_VTOL_TAKEOFF - { - navigation_mode_new = &_rtl; - } + navigation_mode_new = &_rtl; break;