mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 00:05:28 +03:00
PID/PIFF refactoring (#5129)
* Stage 1 PID/PIFF refactoring * Fix F3 compilation * Minor speedup * Make PID controller type configurable * fix compilation * Further minor optimizations * Fix mixer integration * Move some mixer routines to FASTRAM and precompute constants * Run applyMotorRateLimiting only when needed * Revert "Move some mixer routines to FASTRAM and precompute constants" This reverts commit31370c1288
. * Revert "Minor speedup" This reverts commit02b58e5f05
. * fix compilation * Remove unused parameter * Fix F3
This commit is contained in:
parent
d816e859f7
commit
ca46d7ab28
6 changed files with 204 additions and 128 deletions
|
@ -23,6 +23,7 @@
|
|||
#include "maths.h"
|
||||
#include "vector.h"
|
||||
#include "quaternion.h"
|
||||
#include "platform.h"
|
||||
|
||||
// http://lolengine.net/blog/2011/12/21/better-function-approximations
|
||||
// Chebyshev http://stackoverflow.com/questions/345085/how-do-trigonometric-functions-work/345117#345117
|
||||
|
@ -158,7 +159,7 @@ int constrain(int amt, int low, int high)
|
|||
return amt;
|
||||
}
|
||||
|
||||
float constrainf(float amt, float low, float high)
|
||||
float FAST_CODE NOINLINE constrainf(float amt, float low, float high)
|
||||
{
|
||||
if (amt < low)
|
||||
return low;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue