Browse Source

Plane: improve fast/slow tilt in ground tests

when disarmed use the slow tilts so users can judge the rates it will
use in flight
master
Andrew Tridgell 8 years ago
parent
commit
76870f8e01
  1. 9
      ArduPlane/tiltrotor.cpp

9
ArduPlane/tiltrotor.cpp

@ -18,7 +18,14 @@ float QuadPlane::tilt_max_change(bool up) @@ -18,7 +18,14 @@ float QuadPlane::tilt_max_change(bool up)
rate = tilt.max_rate_down_dps;
}
if (tilt.tilt_type != TILT_TYPE_BINARY && !up) {
if (plane.control_mode == MANUAL || (!in_vtol_mode() && !assisted_flight)) {
bool fast_tilt = false;
if (plane.control_mode == MANUAL) {
fast_tilt = true;
}
if (hal.util->get_soft_armed() && !in_vtol_mode() && !assisted_flight) {
fast_tilt = true;
}
if (fast_tilt) {
// allow a minimum of 90 DPS in manual or if we are not
// stabilising, to give fast control
rate = MAX(rate, 90);

Loading…
Cancel
Save