mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
Plane: fixed stick mixing in AUTO modes
the mixing was asymmetric. Many thanks to Soren Kuula for noticing this!
This commit is contained in:
parent
c481ac8745
commit
767d9d0eb5
@ -176,8 +176,10 @@ static void stabilize_stick_mixing_fbw()
|
||||
// the user can direct the plane in any direction with stick
|
||||
// mixing.
|
||||
float roll_input = g.channel_roll.norm_input();
|
||||
if (fabsf(roll_input) > 0.5f) {
|
||||
if (roll_input > 0.5f) {
|
||||
roll_input = (3*roll_input - 1);
|
||||
} else if (roll_input < -0.5f) {
|
||||
roll_input = (3*roll_input + 1);
|
||||
}
|
||||
nav_roll_cd += roll_input * g.roll_limit_cd;
|
||||
nav_roll_cd = constrain_int32(nav_roll_cd, -g.roll_limit_cd.get(), g.roll_limit_cd.get());
|
||||
|
Loading…
Reference in New Issue
Block a user