mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
adjust Ki to keep total i action the same and reduce abs control default to 5
This commit is contained in:
parent
c3b83df962
commit
f0bf7a2955
1 changed files with 5 additions and 1 deletions
|
@ -176,7 +176,7 @@ void resetPidProfile(pidProfile_t *pidProfile)
|
||||||
.acro_trainer_lookahead_ms = 50,
|
.acro_trainer_lookahead_ms = 50,
|
||||||
.acro_trainer_debug_axis = FD_ROLL,
|
.acro_trainer_debug_axis = FD_ROLL,
|
||||||
.acro_trainer_gain = 75,
|
.acro_trainer_gain = 75,
|
||||||
.abs_control_gain = 0,
|
.abs_control_gain = 5,
|
||||||
.abs_control_limit = 90,
|
.abs_control_limit = 90,
|
||||||
.abs_control_error_limit = 20,
|
.abs_control_error_limit = 20,
|
||||||
.abs_control_cutoff = 11,
|
.abs_control_cutoff = 11,
|
||||||
|
@ -638,6 +638,10 @@ void pidInitConfig(const pidProfile_t *pidProfile)
|
||||||
acLimit = (float)pidProfile->abs_control_limit;
|
acLimit = (float)pidProfile->abs_control_limit;
|
||||||
acErrorLimit = (float)pidProfile->abs_control_error_limit;
|
acErrorLimit = (float)pidProfile->abs_control_error_limit;
|
||||||
acCutoff = (float)pidProfile->abs_control_cutoff;
|
acCutoff = (float)pidProfile->abs_control_cutoff;
|
||||||
|
for (int axis = FD_ROLL; axis <= FD_YAW; axis++) {
|
||||||
|
float iCorrection = -acGain * PTERM_SCALE / ITERM_SCALE * pidCoefficient[axis].Kp;
|
||||||
|
pidCoefficient[axis].Ki = MAX(0.0f, pidCoefficient[axis].Ki + iCorrection);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_DYN_LPF
|
#ifdef USE_DYN_LPF
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue