From b9a1c8b31ed3008cff8e051841ff8a07f630ea41 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 9 Mar 2022 15:17:27 +1100 Subject: [PATCH] AP_Scripting: fixed beacon lost in ship landing --- libraries/AP_Scripting/examples/plane_ship_landing.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libraries/AP_Scripting/examples/plane_ship_landing.lua b/libraries/AP_Scripting/examples/plane_ship_landing.lua index fe4d3f7ade..8db18d2475 100644 --- a/libraries/AP_Scripting/examples/plane_ship_landing.lua +++ b/libraries/AP_Scripting/examples/plane_ship_landing.lua @@ -294,6 +294,7 @@ function update_target() arming:set_aux_auth_failed(auth_id, "Ship: no beacon") end have_target = false + return end if not have_target then gcs:send_text(0,"Have beacon") @@ -358,9 +359,6 @@ function update() if SHIP_ENABLE:get() < 1 then return end - if not follow:have_target() then - return - end update_target() if not have_target then