1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-27 16:54:15 +01:00

Subtract deadband offset from then input to still have fine control

This commit is contained in:
Oleg Semyonov 2012-02-18 10:21:51 +02:00
parent 5a2119b896
commit c721d001c0

View File

@ -836,6 +836,11 @@ static void applyDeadband (float *value, float deadband)
{
if (fabs(*value) < deadband)
*value = 0.0f;
else
if (*value > 0.0f)
*value -= deadband;
else
*value += deadband;
}
/**