mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
use a define for ITERM_RELAX_CUTOFF_DEFAULT
use a define for ITERM_RELAX_CUTOFF_DEFAULT lock in at 20hz by default update comment about why do this
This commit is contained in:
parent
a0237e6cde
commit
3458a75283
2 changed files with 4 additions and 3 deletions
|
@ -170,7 +170,7 @@ void resetPidProfile(pidProfile_t *pidProfile)
|
|||
.iterm_rotation = true,
|
||||
.smart_feedforward = false,
|
||||
.iterm_relax = ITERM_RELAX_RP,
|
||||
.iterm_relax_cutoff = 20,
|
||||
.iterm_relax_cutoff = ITERM_RELAX_CUTOFF_DEFAULT,
|
||||
.iterm_relax_type = ITERM_RELAX_SETPOINT,
|
||||
.acro_trainer_angle_limit = 20,
|
||||
.acro_trainer_lookahead_ms = 50,
|
||||
|
@ -621,8 +621,8 @@ void pidInitConfig(const pidProfile_t *pidProfile)
|
|||
itermRelax = pidProfile->iterm_relax;
|
||||
itermRelaxType = pidProfile->iterm_relax_type;
|
||||
itermRelaxCutoff = pidProfile->iterm_relax_cutoff;
|
||||
// 20.0f below is current default itermRelaxCutoff value, to adapt setpoint to change from cutoff
|
||||
itermRelaxSetpointThreshold = ITERM_RELAX_SETPOINT_THRESHOLD * 20.0f / itermRelaxCutoff;
|
||||
// adapt setpoint threshold to user changes from default cutoff value
|
||||
itermRelaxSetpointThreshold = ITERM_RELAX_SETPOINT_THRESHOLD * ITERM_RELAX_CUTOFF_DEFAULT / itermRelaxCutoff;
|
||||
#endif
|
||||
|
||||
#ifdef USE_ACRO_TRAINER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue