mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 13:25:30 +03:00
Revert "Merge pull request #372 from aughey/betaflight"
This reverts commita6a5f50ffb
, reversing changes made to9cc5503851
.
This commit is contained in:
parent
a6a5f50ffb
commit
5ffb3b5068
6 changed files with 30 additions and 58 deletions
|
@ -111,6 +111,26 @@ int32_t applyDeadband(int32_t value, int32_t deadband)
|
|||
return value;
|
||||
}
|
||||
|
||||
inline int constrain(int amt, int low, int high)
|
||||
{
|
||||
if (amt < low)
|
||||
return low;
|
||||
else if (amt > high)
|
||||
return high;
|
||||
else
|
||||
return amt;
|
||||
}
|
||||
|
||||
inline 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue