1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

Insane Acro Sensitivity Fix

This commit is contained in:
borisbstyle 2016-01-13 02:01:27 +01:00
parent 29a936e773
commit fcc14135f5
2 changed files with 7 additions and 8 deletions

View file

@ -94,11 +94,6 @@ void airModePlus(airModePlus_t *axisState, int axis, pidProfile_t *pidProfile) {
//Ki scaler //Ki scaler
axisState->iTermScaler = constrainf(1.0f - (1.5f * rcCommandReflection), 0.0f, minItermScaler); axisState->iTermScaler = constrainf(1.0f - (1.5f * rcCommandReflection), 0.0f, minItermScaler);
if (minItermScaler > axisState->iTermScaler) minItermScaler = axisState->iTermScaler; if (minItermScaler > axisState->iTermScaler) minItermScaler = axisState->iTermScaler;
if (axis != YAW && pidProfile->airModeInsaneAcrobilityFactor) {
axisState->wowFactor = 1.0f - (rcCommandReflection * ((float)pidProfile->airModeInsaneAcrobilityFactor / 100.0f)); //0-1f
axisState->factor = (axisState->wowFactor * rcCommandReflection) * 1000;
}
} else { } else {
// Prevent rapid windup // Prevent rapid windup
if (minItermScaler < 1) { if (minItermScaler < 1) {
@ -107,13 +102,17 @@ void airModePlus(airModePlus_t *axisState, int axis, pidProfile_t *pidProfile) {
minItermScaler = 1; minItermScaler = 1;
} }
} }
if (axis != YAW && pidProfile->airModeInsaneAcrobilityFactor) {
axisState->wowFactor = rcCommandReflection * ((float)pidProfile->airModeInsaneAcrobilityFactor / 100.0f); //0-1f
axisState->factor = axisState->wowFactor * rcCommandReflection * 1000;
axisState->wowFactor = 1.0f - axisState->wowFactor;
}
} }
const angle_index_t rcAliasToAngleIndexMap[] = { AI_ROLL, AI_PITCH }; const angle_index_t rcAliasToAngleIndexMap[] = { AI_ROLL, AI_PITCH };
static airModePlus_t airModePlusAxisState[3]; static airModePlus_t airModePlusAxisState[3];
//static int8_t * deltaFIRTable = 0L;
//static int16_t deltaFIRState[3][FILTER_TAPS];
static bool deltaStateIsSet = false; static bool deltaStateIsSet = false;
static biquad_t deltaBiQuadState[3]; static biquad_t deltaBiQuadState[3];

View file

@ -657,7 +657,7 @@ const clivalue_t valueTable[] = {
{ "d_vel", VAR_UINT8 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.D8[PIDVEL], .config.minmax = { 0, 200 } }, { "d_vel", VAR_UINT8 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.D8[PIDVEL], .config.minmax = { 0, 200 } },
{ "gyro_soft_lpf", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, &masterConfig.profile[0].pidProfile.gyro_soft_lpf, .config.lookup = { TABLE_OFF_ON } }, { "gyro_soft_lpf", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, &masterConfig.profile[0].pidProfile.gyro_soft_lpf, .config.lookup = { TABLE_OFF_ON } },
{ "insane_acrobility_factor", VAR_UINT16 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.airModeInsaneAcrobilityFactor, .config.minmax = {0, 30 } }, { "insane_acro_factor", VAR_UINT16 | PROFILE_VALUE, &masterConfig.profile[0].pidProfile.airModeInsaneAcrobilityFactor, .config.minmax = {0, 100 } },
#ifdef BLACKBOX #ifdef BLACKBOX
{ "blackbox_rate_num", VAR_UINT8 | MASTER_VALUE, &masterConfig.blackbox_rate_num, .config.minmax = { 1, 32 } }, { "blackbox_rate_num", VAR_UINT8 | MASTER_VALUE, &masterConfig.blackbox_rate_num, .config.minmax = { 1, 32 } },