mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 21:35:44 +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,
|
.iterm_rotation = true,
|
||||||
.smart_feedforward = false,
|
.smart_feedforward = false,
|
||||||
.iterm_relax = ITERM_RELAX_RP,
|
.iterm_relax = ITERM_RELAX_RP,
|
||||||
.iterm_relax_cutoff = 20,
|
.iterm_relax_cutoff = ITERM_RELAX_CUTOFF_DEFAULT,
|
||||||
.iterm_relax_type = ITERM_RELAX_SETPOINT,
|
.iterm_relax_type = ITERM_RELAX_SETPOINT,
|
||||||
.acro_trainer_angle_limit = 20,
|
.acro_trainer_angle_limit = 20,
|
||||||
.acro_trainer_lookahead_ms = 50,
|
.acro_trainer_lookahead_ms = 50,
|
||||||
|
@ -621,8 +621,8 @@ void pidInitConfig(const pidProfile_t *pidProfile)
|
||||||
itermRelax = pidProfile->iterm_relax;
|
itermRelax = pidProfile->iterm_relax;
|
||||||
itermRelaxType = pidProfile->iterm_relax_type;
|
itermRelaxType = pidProfile->iterm_relax_type;
|
||||||
itermRelaxCutoff = pidProfile->iterm_relax_cutoff;
|
itermRelaxCutoff = pidProfile->iterm_relax_cutoff;
|
||||||
// 20.0f below is current default itermRelaxCutoff value, to adapt setpoint to change from cutoff
|
// adapt setpoint threshold to user changes from default cutoff value
|
||||||
itermRelaxSetpointThreshold = ITERM_RELAX_SETPOINT_THRESHOLD * 20.0f / itermRelaxCutoff;
|
itermRelaxSetpointThreshold = ITERM_RELAX_SETPOINT_THRESHOLD * ITERM_RELAX_CUTOFF_DEFAULT / itermRelaxCutoff;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_ACRO_TRAINER
|
#ifdef USE_ACRO_TRAINER
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
|
|
||||||
// Full iterm suppression in setpoint mode at high-passed setpoint rate > 40deg/sec
|
// Full iterm suppression in setpoint mode at high-passed setpoint rate > 40deg/sec
|
||||||
#define ITERM_RELAX_SETPOINT_THRESHOLD 40.0f
|
#define ITERM_RELAX_SETPOINT_THRESHOLD 40.0f
|
||||||
|
#define ITERM_RELAX_CUTOFF_DEFAULT 20
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
PID_ROLL,
|
PID_ROLL,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue