mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 16:25:26 +03:00
make d boost gyro delta LPF configurable
This commit is contained in:
parent
b5870f5975
commit
c26f033c0d
3 changed files with 8 additions and 1 deletions
|
@ -1146,6 +1146,11 @@ groups:
|
|||
condition: USE_D_BOOST
|
||||
min: 1000
|
||||
max: 16000
|
||||
- name: d_boost_gyro_delta_lpf_hz
|
||||
field: dBoostGyroDeltaLpfHz
|
||||
condition: USE_D_BOOST
|
||||
min: 10
|
||||
max: 250
|
||||
|
||||
- name: PG_PID_AUTOTUNE_CONFIG
|
||||
type: pidAutotuneConfig_t
|
||||
|
|
|
@ -230,6 +230,7 @@ PG_RESET_TEMPLATE(pidProfile_t, pidProfile,
|
|||
.iterm_relax = ITERM_RELAX_OFF,
|
||||
.dBoostFactor = 1.0f,
|
||||
.dBoostMaxAtAlleceleration = 7500.0f,
|
||||
.dBoostGyroDeltaLpfHz = D_BOOST_GYRO_LPF_HZ,
|
||||
);
|
||||
|
||||
void pidInit(void)
|
||||
|
@ -251,7 +252,7 @@ void pidInit(void)
|
|||
dBoostMaxAtAlleceleration = pidProfile()->dBoostMaxAtAlleceleration;
|
||||
|
||||
for (int axis = 0; axis < XYZ_AXIS_COUNT; axis++) {
|
||||
biquadFilterInitLPF(&dBoostGyroLpf[axis], D_BOOST_GYRO_LPF_HZ, getLooptime());
|
||||
biquadFilterInitLPF(&dBoostGyroLpf[axis], pidProfile()->dBoostGyroDeltaLpfHz, getLooptime());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -130,6 +130,7 @@ typedef struct pidProfile_s {
|
|||
|
||||
float dBoostFactor;
|
||||
float dBoostMaxAtAlleceleration;
|
||||
uint8_t dBoostGyroDeltaLpfHz;
|
||||
} pidProfile_t;
|
||||
|
||||
typedef struct pidAutotuneConfig_s {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue