mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-22 15:55:48 +03:00
New experimental parameters for airmode
This commit is contained in:
parent
2ee55ece3c
commit
bd39f07c1f
1 changed files with 29 additions and 27 deletions
|
@ -85,7 +85,11 @@ void pidResetErrorGyro(void)
|
|||
|
||||
void airModePlus(airModePlus_t *axisState, int axis, pidProfile_t *pidProfile, float referenceTerm) {
|
||||
float rcCommandReflection = (float)rcCommand[axis] / 500.0f;
|
||||
axisState->wowFactor = 1;
|
||||
axisState->factor = 0;
|
||||
axisState->iTermScaler = 1;
|
||||
|
||||
if (rcCommandReflection > 0.7f) {
|
||||
//Ki scaler
|
||||
axisState->iTermScaler = constrainf(1.0f - (1.5f * ABS(rcCommandReflection)), 0.0f, 1.0f);
|
||||
|
||||
|
@ -115,9 +119,7 @@ void airModePlus(airModePlus_t *axisState, int axis, pidProfile_t *pidProfile, f
|
|||
if (axis != YAW && pidProfile->airModeInsaneAcrobilityFactor) {
|
||||
axisState->wowFactor = 1.0f - (ABS(rcCommandReflection) * ((float)pidProfile->airModeInsaneAcrobilityFactor / 100.0f)); //0-1f
|
||||
axisState->factor = (axisState->wowFactor * rcCommandReflection) * 1000;
|
||||
} else {
|
||||
axisState->wowFactor = 1;
|
||||
axisState->factor = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue