1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-13 03:19:58 +03:00

Update navigation_multicopter.c

This commit is contained in:
breadoven 2024-04-22 23:17:06 +01:00
parent a393edc752
commit bd5f74fc49

View file

@ -561,7 +561,8 @@ static float computeVelocityScale(
if (activeSpeed <= 0.0f) {
return 0.0f;
}
const float normalized = computeNormalizedVelocity(activeSpeed, attenuationEndVel);
const float normalized = computeNormalizedVelocity(activeSpeed, attenuationEndVel - attenuationStartVel);
float scale = scaleRangef(normalized, 0.0f, 1.0f, 0.0f, attenuationFactor);
return constrainf(scale, 0.0f, attenuationFactor);
}