Plane: tilt motors fast in final stages of quadplane transition

when transition of tilt quadplane has reached the stage where the tilted
motors are used solely for fwd thrust and rear motors are off we should
move the tilt to full forward rapidly
This commit is contained in:
Andrew Tridgell 2017-04-17 11:31:57 +10:00
parent 5b47927937
commit 8e3f8f47c8
1 changed files with 6 additions and 3 deletions

View File

@ -17,9 +17,12 @@ float QuadPlane::tilt_max_change(bool up)
} else { } else {
rate = tilt.max_rate_down_dps; rate = tilt.max_rate_down_dps;
} }
if (plane.control_mode == MANUAL && tilt.tilt_type != TILT_TYPE_BINARY) { if (tilt.tilt_type != TILT_TYPE_BINARY && !up) {
// allow a minimum of 90 DPS in manual, to give fast control if (plane.control_mode == MANUAL || (!in_vtol_mode() && !assisted_flight)) {
rate = MAX(rate, 90); // allow a minimum of 90 DPS in manual or if we are not
// stabilising, to give fast control
rate = MAX(rate, 90);
}
} }
return rate * plane.G_Dt / 90.0f; return rate * plane.G_Dt / 90.0f;
} }