From 9ae6fd408b2db464f3e9cfed738a05e1c578dfd6 Mon Sep 17 00:00:00 2001 From: Julian Kent Date: Tue, 20 Oct 2020 10:31:44 +0200 Subject: [PATCH] Check that home position is valid in RTL (#15964) --- src/modules/navigator/rtl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/navigator/rtl.cpp b/src/modules/navigator/rtl.cpp index 5e02a8eccebb..b403959313ce 100644 --- a/src/modules/navigator/rtl.cpp +++ b/src/modules/navigator/rtl.cpp @@ -76,6 +76,10 @@ void RTL::find_RTL_destination() return; } + if (!_navigator->home_position_valid()) { + return; + } + _destination_check_time = hrt_absolute_time(); // get home position: