From 8ebe64a274733d46b5132bc3a547da0a04bd43d2 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Fri, 26 Feb 2021 17:43:38 +0000 Subject: [PATCH] Plane: Quadplane disable forward motor assist in Q modes if rangefinder is out of range low --- ArduPlane/quadplane.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ArduPlane/quadplane.cpp b/ArduPlane/quadplane.cpp index 8db411ebae..3d29b8b4f6 100644 --- a/ArduPlane/quadplane.cpp +++ b/ArduPlane/quadplane.cpp @@ -3209,8 +3209,9 @@ int8_t QuadPlane::forward_throttle_pct() // lidar could cause the aircraft not to be able to // approach the landing point when landing below the takeoff point vel_forward.last_pct = vel_forward.integrator; - } else if (in_vtol_land_final() && motors->limit.throttle_lower) { - // we're in the settling phase of landing, disable fwd motor + } else if ((in_vtol_land_final() && motors->limit.throttle_lower) || + (plane.g.rangefinder_landing && (plane.rangefinder.status_orient(ROTATION_PITCH_270) == RangeFinder::Status::OutOfRangeLow))) { + // we're in the settling phase of landing or using a rangefinder that is out of range low, disable fwd motor vel_forward.last_pct = 0; vel_forward.integrator = 0; } else {