mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
Copter: fix for acro throttle bug
This commit is contained in:
parent
54fffd1348
commit
476a6d0164
@ -737,7 +737,11 @@ static int16_t get_angle_boost(int16_t throttle)
|
||||
int16_t throttle_out;
|
||||
|
||||
temp = constrain(temp, 0.5f, 1.0f);
|
||||
temp = constrain(9000-max(labs(roll_axis),labs(pitch_axis)), 0, 3000) / (3000 * temp);
|
||||
|
||||
// reduce throttle if we go inverted
|
||||
temp = constrain(9000-max(labs(ahrs.roll_sensor),labs(ahrs.pitch_sensor)), 0, 3000) / (3000 * temp);
|
||||
|
||||
// apply scale and constrain throttle
|
||||
throttle_out = constrain((float)(throttle-g.throttle_min) * temp + g.throttle_min, g.throttle_min, 1000);
|
||||
|
||||
// to allow logging of angle boost
|
||||
|
Loading…
Reference in New Issue
Block a user