mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-13 19:40:27 +03:00
Update navigation_multicopter.c
This commit is contained in:
parent
a393edc752
commit
bd5f74fc49
1 changed files with 2 additions and 1 deletions
|
@ -561,7 +561,8 @@ static float computeVelocityScale(
|
||||||
if (activeSpeed <= 0.0f) {
|
if (activeSpeed <= 0.0f) {
|
||||||
return 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);
|
float scale = scaleRangef(normalized, 0.0f, 1.0f, 0.0f, attenuationFactor);
|
||||||
return constrainf(scale, 0.0f, attenuationFactor);
|
return constrainf(scale, 0.0f, attenuationFactor);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue