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:
parent
5a2119b896
commit
c721d001c0
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user