1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

OP-1893 Deadband scale

This commit is contained in:
Laurent Lalanne 2015-05-18 00:19:53 +02:00
parent 330b396a73
commit 3eef68c017

View File

@ -795,9 +795,9 @@ static void applyDeadband(float *value, float deadband)
if (fabsf(*value) < deadband) {
*value = 0.0f;
} else if (*value > 0.0f) {
*value -= deadband;
*value = (*value - deadband) / (1.0f - deadband);
} else {
*value += deadband;
*value = (*value + deadband) / (1.0f - deadband);
}
}