mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-22 15:55:48 +03:00
Change D Scale to match CF transition better
This commit is contained in:
parent
5f1540dbcb
commit
769ddd39af
2 changed files with 5 additions and 5 deletions
|
@ -133,7 +133,7 @@ static uint32_t activeFeaturesLatch = 0;
|
||||||
static uint8_t currentControlRateProfileIndex = 0;
|
static uint8_t currentControlRateProfileIndex = 0;
|
||||||
controlRateConfig_t *currentControlRateProfile;
|
controlRateConfig_t *currentControlRateProfile;
|
||||||
|
|
||||||
static const uint8_t EEPROM_CONF_VERSION = 114;
|
static const uint8_t EEPROM_CONF_VERSION = 115;
|
||||||
|
|
||||||
static void resetAccelerometerTrims(flightDynamicsTrims_t *accelerometerTrims)
|
static void resetAccelerometerTrims(flightDynamicsTrims_t *accelerometerTrims)
|
||||||
{
|
{
|
||||||
|
@ -148,13 +148,13 @@ static void resetPidProfile(pidProfile_t *pidProfile)
|
||||||
|
|
||||||
pidProfile->P8[ROLL] = 40;
|
pidProfile->P8[ROLL] = 40;
|
||||||
pidProfile->I8[ROLL] = 30;
|
pidProfile->I8[ROLL] = 30;
|
||||||
pidProfile->D8[ROLL] = 18;
|
pidProfile->D8[ROLL] = 23;
|
||||||
pidProfile->P8[PITCH] = 40;
|
pidProfile->P8[PITCH] = 40;
|
||||||
pidProfile->I8[PITCH] = 30;
|
pidProfile->I8[PITCH] = 30;
|
||||||
pidProfile->D8[PITCH] = 18;
|
pidProfile->D8[PITCH] = 23;
|
||||||
pidProfile->P8[YAW] = 100;
|
pidProfile->P8[YAW] = 100;
|
||||||
pidProfile->I8[YAW] = 50;
|
pidProfile->I8[YAW] = 50;
|
||||||
pidProfile->D8[YAW] = 10;
|
pidProfile->D8[YAW] = 12;
|
||||||
pidProfile->P8[PIDALT] = 50;
|
pidProfile->P8[PIDALT] = 50;
|
||||||
pidProfile->I8[PIDALT] = 0;
|
pidProfile->I8[PIDALT] = 0;
|
||||||
pidProfile->D8[PIDALT] = 0;
|
pidProfile->D8[PIDALT] = 0;
|
||||||
|
|
|
@ -318,7 +318,7 @@ static void pidRewrite(pidProfile_t *pidProfile, controlRateConfig_t *controlRat
|
||||||
delta = filterApplyPt1(delta, &DTermState[axis], pidProfile->dterm_cut_hz, dT);
|
delta = filterApplyPt1(delta, &DTermState[axis], pidProfile->dterm_cut_hz, dT);
|
||||||
}
|
}
|
||||||
|
|
||||||
DTerm = (delta * 3 * pidProfile->D8[axis] * PIDweight[axis] / 100) >> 8; // Multiplied by 3 to match old scaling
|
DTerm = (delta * 2 * pidProfile->D8[axis] * PIDweight[axis] / 100) >> 8; // Multiplied by 2 to approximately match old scaling
|
||||||
|
|
||||||
// -----calculate total PID output
|
// -----calculate total PID output
|
||||||
axisPID[axis] = PTerm + ITerm + DTerm;
|
axisPID[axis] = PTerm + ITerm + DTerm;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue