1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 06:15:16 +03:00

Moving constrain and constrainf to the include file to be inlined.

This commit is contained in:
JOhn Aughey 2016-05-02 10:03:43 -05:00
parent 6d15c03813
commit b6ff69feda
2 changed files with 22 additions and 20 deletions

View file

@ -111,26 +111,6 @@ int32_t applyDeadband(int32_t value, int32_t deadband)
return value;
}
int constrain(int amt, int low, int high)
{
if (amt < low)
return low;
else if (amt > high)
return high;
else
return amt;
}
float constrainf(float amt, float low, float high)
{
if (amt < low)
return low;
else if (amt > high)
return high;
else
return amt;
}
void devClear(stdev_t *dev)
{
dev->m_n = 0;