1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

AltHold cleanup.

* Renamed several methods and variables so they make more sense.
* Move more altitude hold related code out of imu.c/h into
altitudehold.c/h.
* Fixed a unsigned integer being using instead of an signed integer in
the throttle calculation code.
This commit is contained in:
Dominic Clifton 2014-09-29 01:34:15 +01:00
parent 7d4abb8a4a
commit daa823ddba
8 changed files with 222 additions and 199 deletions

View file

@ -40,6 +40,8 @@ typedef struct stdev_t
int m_n;
} stdev_t;
int32_t applyDeadband(int32_t value, int32_t deadband);
int constrain(int amt, int low, int high);
float constrainf(float amt, float low, float high);
@ -48,4 +50,5 @@ void devPush(stdev_t *dev, float x);
float devVariance(stdev_t *dev);
float devStandardDeviation(stdev_t *dev);
float degreesToRadians(int16_t degrees);
int scaleRange(int x, int srcMin, int srcMax, int destMin, int destMax);