Skip to content
Snippets Groups Projects
Commit 903deb75 authored by bresch's avatar bresch Committed by Lorenz Meier
Browse files

RTL - Skip descend state if no delay is set between descend and land

parent 57637878
No related branches found
No related tags found
No related merge requests found
......@@ -309,7 +309,14 @@ RTL::advance_rtl()
break;
case RTL_STATE_RETURN:
_rtl_state = RTL_STATE_DESCEND;
// Descend to desired altitude if delay is set, directly land otherwise
if (_param_rtl_land_delay.get() < -DELAY_SIGMA || _param_rtl_land_delay.get() > DELAY_SIGMA) {
_rtl_state = RTL_STATE_DESCEND;
} else {
_rtl_state = RTL_STATE_LAND;
}
if (_navigator->get_vstatus()->is_vtol && !_navigator->get_vstatus()->is_rotary_wing) {
_rtl_state = RTL_STATE_TRANSITION_TO_MC;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment