mirror of https://github.com/ArduPilot/ardupilot
ACM: Added a more sane limit to Angle boost
This commit is contained in:
parent
64cfaf74b7
commit
bc631b656e
|
@ -504,7 +504,7 @@ static long
|
||||||
static int16_t get_angle_boost(int16_t value)
|
static int16_t get_angle_boost(int16_t value)
|
||||||
{
|
{
|
||||||
float temp = cos_pitch_x * cos_roll_x;
|
float temp = cos_pitch_x * cos_roll_x;
|
||||||
temp = constrain(temp, .5, 1.0);
|
temp = constrain(temp, .75, 1.0);
|
||||||
return ((float)(g.throttle_cruise + 80) / temp) - (g.throttle_cruise + 80);
|
return ((float)(g.throttle_cruise + 80) / temp) - (g.throttle_cruise + 80);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue