1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 01:35:41 +03:00

add Thrust Linearization feature

This commit is contained in:
Thorsten Laux 2018-12-28 08:53:34 +01:00
parent 4778ad6c0f
commit ad253c146b
9 changed files with 60 additions and 2 deletions

View file

@ -159,6 +159,7 @@ typedef struct pidProfile_s {
uint8_t launchControlAllowTriggerReset; // Controls trigger behavior and whether the trigger can be reset
uint8_t use_integrated_yaw; // Selects whether the yaw pidsum should integrated
uint8_t integrated_yaw_relax; // Specifies how much integrated yaw should be reduced to offset the drag based yaw component
uint8_t thrustLinearization; // Compensation factor for pid linearization
} pidProfile_t;
PG_DECLARE_ARRAY(pidProfile_t, MAX_PROFILE_COUNT, pidProfiles);
@ -210,6 +211,10 @@ bool pidOsdAntiGravityActive(void);
bool pidOsdAntiGravityMode(void);
void pidSetAntiGravityState(bool newState);
bool pidAntiGravityEnabled(void);
#ifdef USE_THRUST_LINEARIZATION
float pidApplyThrustLinearization(float motorValue);
float pidCompensateThrustLinearization(float throttle);
#endif
#ifdef UNIT_TEST
#include "sensors/acceleration.h"