Plane: Quadplane disable forward motor assist in Q modes if rangefinder is out of range low

This commit is contained in:
Iampete1 2021-02-26 17:43:38 +00:00 committed by Andrew Tridgell
parent 97e7b48ca1
commit 8ebe64a274
1 changed files with 3 additions and 2 deletions

View File

@ -3209,8 +3209,9 @@ int8_t QuadPlane::forward_throttle_pct()
// lidar could cause the aircraft not to be able to // lidar could cause the aircraft not to be able to
// approach the landing point when landing below the takeoff point // approach the landing point when landing below the takeoff point
vel_forward.last_pct = vel_forward.integrator; vel_forward.last_pct = vel_forward.integrator;
} else if (in_vtol_land_final() && motors->limit.throttle_lower) { } else if ((in_vtol_land_final() && motors->limit.throttle_lower) ||
// we're in the settling phase of landing, disable fwd motor (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.last_pct = 0;
vel_forward.integrator = 0; vel_forward.integrator = 0;
} else { } else {