1
0
Fork 0
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 commit 31370c1288.

* Revert "Minor speedup"

This reverts commit 02b58e5f05.

* fix compilation

* Remove unused parameter

* Fix F3
This commit is contained in:
Paweł Spychalski 2019-11-29 20:22:27 +01:00 committed by GitHub
parent d816e859f7
commit ca46d7ab28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 204 additions and 128 deletions

View file

@ -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;