diff --git a/ArduPlane/commands.cpp b/ArduPlane/commands.cpp index 623e275e23..dc746ccfd0 100644 --- a/ArduPlane/commands.cpp +++ b/ArduPlane/commands.cpp @@ -99,6 +99,9 @@ void Plane::set_guided_WP(void) auto_state.vtol_loiter = false; loiter_angle_reset(); + + // cancel pending takeoff + quadplane.guided_takeoff = false; } /* diff --git a/ArduPlane/quadplane.cpp b/ArduPlane/quadplane.cpp index 757f0b8882..dfedf12c37 100644 --- a/ArduPlane/quadplane.cpp +++ b/ArduPlane/quadplane.cpp @@ -2508,6 +2508,10 @@ bool QuadPlane::in_vtol_mode(void) const poscontrol.get_state() > QPOS_APPROACH) { return true; } + if (plane.control_mode == &plane.mode_guided && + guided_takeoff) { + return true; + } if (in_vtol_auto()) { if (!plane.auto_state.vtol_loiter || poscontrol.get_state() > QPOS_APPROACH) { return true;