Browse Source

Copter: fix tuning knob rate control of winch

master
Randy Mackay 7 years ago
parent
commit
47bbf49aa6
  1. 8
      ArduCopter/tuning.cpp

8
ArduCopter/tuning.cpp

@ -215,11 +215,11 @@ void Copter::tuning() { @@ -215,11 +215,11 @@ void Copter::tuning() {
case TUNING_WINCH: {
float desired_rate = 0.0f;
if (v > 0.8f) {
desired_rate = g2.winch.get_rate_max();
if (v > 0.6f) {
desired_rate = g2.winch.get_rate_max() * (v - 0.6f) / 0.4f;
}
if (v < 0.2f) {
desired_rate = -g2.winch.get_rate_max();
if (v < 0.4f) {
desired_rate = g2.winch.get_rate_max() * (v - 0.4) / 0.4f;
}
g2.winch.set_desired_rate(desired_rate);
break;

Loading…
Cancel
Save