|
|
|
@ -94,7 +94,7 @@ static void get_pilot_desired_angle_rates(int16_t roll_in, int16_t pitch_in, int
@@ -94,7 +94,7 @@ static void get_pilot_desired_angle_rates(int16_t roll_in, int16_t pitch_in, int
|
|
|
|
|
rate_bf_request.y += rate_bf_level.y; |
|
|
|
|
rate_bf_request.z += rate_bf_level.z; |
|
|
|
|
}else{ |
|
|
|
|
acro_level_mix = constrain_float(1-max(max(abs(roll_in), abs(pitch_in)), abs(yaw_in))/4500.0, 0, 1)*cos_pitch_x; |
|
|
|
|
acro_level_mix = constrain_float(1-max(max(abs(roll_in), abs(pitch_in)), abs(yaw_in))/4500.0, 0, 1)*ahrs.cos_pitch(); |
|
|
|
|
|
|
|
|
|
// Scale leveling rates by stick input |
|
|
|
|
rate_bf_level = rate_bf_level*acro_level_mix; |
|
|
|
|