diff --git a/ArduPlane/mode_rtl.cpp b/ArduPlane/mode_rtl.cpp index c35a3b64a6abd..cd0a9aed25c20 100644 --- a/ArduPlane/mode_rtl.cpp +++ b/ArduPlane/mode_rtl.cpp @@ -18,6 +18,15 @@ bool ModeRTL::_enter() return true; } + // treat RTL as QLAND if we are armed and idling in a q-mode on the ground + // (when disarmed, allow RTL mode, so pilots can test switches) + if (plane.arming.is_armed() && + plane.control_mode->is_vtol_mode() && + plane.quadplane.motors->get_desired_spool_state() == AP_Motors::DesiredSpoolState::GROUND_IDLE) { + plane.set_mode(plane.mode_qland, ModeReason::QLAND_INSTEAD_OF_RTL); + return true; + } + // if Q_RTL_MODE is QRTL always, immediately switch to QRTL mode if (plane.quadplane.rtl_mode == QuadPlane::RTL_MODE::QRTL_ALWAYS) { plane.set_mode(plane.mode_qrtl, ModeReason::QRTL_INSTEAD_OF_RTL);