From 339b829695ec5f697464e4eaf4875a5b737b0fdb Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Wed, 14 Jun 2017 21:43:02 +0200 Subject: [PATCH] Navigator: Fix RTL backtransition for VTOL A recent change removed the command forwarding required for VTOL transitions. This change brings this back. Partially reverts https://github.com/PX4/Firmware/pull/7249 --- src/modules/navigator/rtl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/navigator/rtl.cpp b/src/modules/navigator/rtl.cpp index c1f705f66f8f..b9ff7c104ff6 100644 --- a/src/modules/navigator/rtl.cpp +++ b/src/modules/navigator/rtl.cpp @@ -300,6 +300,11 @@ RTL::set_rtl_item() reset_mission_item_reached(); + /* execute command if set. This is required for commands like VTOL transition */ + if (!item_contains_position(&_mission_item)) { + issue_command(&_mission_item); + } + /* convert mission item to current position setpoint and make it valid */ mission_item_to_position_setpoint(&_mission_item, &pos_sp_triplet->current); pos_sp_triplet->next.valid = false;