Browse Source

Copter: limit throttle mid to throttle min + 50

mission-4.1.18
Leonard Hall 10 years ago committed by Randy Mackay
parent
commit
0129110502
  1. 4
      ArduCopter/Attitude.cpp

4
ArduCopter/Attitude.cpp

@ -140,7 +140,7 @@ int16_t Copter::get_pilot_desired_throttle(int16_t throttle_control) @@ -140,7 +140,7 @@ int16_t Copter::get_pilot_desired_throttle(int16_t throttle_control)
// ensure reasonable throttle values
throttle_control = constrain_int16(throttle_control,0,1000);
g.throttle_mid = constrain_int16(g.throttle_mid,300,700);
g.throttle_mid = constrain_int16(g.throttle_mid,g.throttle_min+50,700);
// check throttle is above, below or in the deadband
if (throttle_control < mid_stick) {
@ -218,7 +218,7 @@ float Copter::get_throttle_pre_takeoff(float input_thr) @@ -218,7 +218,7 @@ float Copter::get_throttle_pre_takeoff(float input_thr)
}
// TODO: does this parameter sanity check really belong here?
g.throttle_mid = constrain_int16(g.throttle_mid,300,700);
g.throttle_mid = constrain_int16(g.throttle_mid,g.throttle_min+50,700);
float in_min = g.throttle_min;
float in_max = get_takeoff_trigger_throttle();

Loading…
Cancel
Save