mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 23:35:34 +03:00
make the accZ lpf used for althold configurable
set the variable accz_lpf_cutoff to the desired cutoff frequency this can help to make althold smoother on copters with lots of vibrations Conflicts: src/cli.c src/config.c src/imu.c src/mw.h
This commit is contained in:
parent
c53268b7be
commit
1bf806f54c
5 changed files with 13 additions and 5 deletions
|
@ -85,7 +85,7 @@ static uint32_t flashWriteAddress = (0x08000000 + (uint32_t)((FLASH_PAGE_SIZE *
|
|||
master_t masterConfig; // master config struct with data independent from profiles
|
||||
profile_t currentProfile; // profile config struct
|
||||
|
||||
static const uint8_t EEPROM_CONF_VERSION = 73;
|
||||
static const uint8_t EEPROM_CONF_VERSION = 74;
|
||||
|
||||
static void resetAccelerometerTrims(flightDynamicsTrims_t *accelerometerTrims)
|
||||
{
|
||||
|
@ -305,6 +305,7 @@ static void resetConf(void)
|
|||
|
||||
currentProfile.mag_declination = 0;
|
||||
currentProfile.acc_lpf_factor = 4;
|
||||
currentProfile.accz_lpf_cutoff = 5.0f;
|
||||
currentProfile.accDeadband.xy = 40;
|
||||
currentProfile.accDeadband.z = 40;
|
||||
|
||||
|
@ -425,6 +426,7 @@ void activateConfig(void)
|
|||
configureImu(&imuRuntimeConfig, ¤tProfile.pidProfile, ¤tProfile.barometerConfig, ¤tProfile.accDeadband);
|
||||
|
||||
calculateThrottleAngleScale(currentProfile.throttle_correction_angle);
|
||||
calculateAccZLowPassFilterRCTimeConstant(currentProfile.accz_lpf_cutoff);
|
||||
|
||||
#ifdef BARO
|
||||
useBarometerConfig(¤tProfile.barometerConfig);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue