mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Initial dynamic PID implementation
New Defaults and some rework in dynamic PID Cli Fixes Copy / Paste Protection Change Stick threshold Remove differentiator Change Default PIDs
This commit is contained in:
parent
ad756bceb4
commit
a4456ce6b9
7 changed files with 48 additions and 70 deletions
|
@ -148,10 +148,10 @@ static void resetPidProfile(pidProfile_t *pidProfile)
|
|||
pidProfile->pidController = 1;
|
||||
|
||||
pidProfile->P8[ROLL] = 45;
|
||||
pidProfile->I8[ROLL] = 30;
|
||||
pidProfile->I8[ROLL] = 35;
|
||||
pidProfile->D8[ROLL] = 18;
|
||||
pidProfile->P8[PITCH] = 45;
|
||||
pidProfile->I8[PITCH] = 30;
|
||||
pidProfile->I8[PITCH] = 35;
|
||||
pidProfile->D8[PITCH] = 18;
|
||||
pidProfile->P8[YAW] = 90;
|
||||
pidProfile->I8[YAW] = 40;
|
||||
|
@ -177,11 +177,12 @@ static void resetPidProfile(pidProfile_t *pidProfile)
|
|||
pidProfile->D8[PIDVEL] = 75;
|
||||
|
||||
pidProfile->yaw_p_limit = YAW_P_LIMIT_MAX;
|
||||
pidProfile->yaw_lpf_hz = 100;
|
||||
pidProfile->yaw_lpf_hz = 70;
|
||||
pidProfile->rollPitchItermResetRate = 200;
|
||||
pidProfile->rollPitchItermResetAlways = 0;
|
||||
pidProfile->yawItermResetRate = 50;
|
||||
pidProfile->dterm_lpf_hz = 70; // filtering ON by default
|
||||
pidProfile->dynamic_pterm = 1;
|
||||
|
||||
pidProfile->H_sensitivity = 75; // TODO - Cleanup during next EEPROM changes
|
||||
|
||||
|
@ -307,9 +308,9 @@ static void resetControlRateConfig(controlRateConfig_t *controlRateConfig) {
|
|||
controlRateConfig->rcExpo8 = 60;
|
||||
controlRateConfig->thrMid8 = 50;
|
||||
controlRateConfig->thrExpo8 = 0;
|
||||
controlRateConfig->dynThrPID = 0;
|
||||
controlRateConfig->dynThrPID = 20;
|
||||
controlRateConfig->rcYawExpo8 = 20;
|
||||
controlRateConfig->tpa_breakpoint = 1500;
|
||||
controlRateConfig->tpa_breakpoint = 1650;
|
||||
|
||||
for (uint8_t axis = 0; axis < FLIGHT_DYNAMICS_INDEX_COUNT; axis++) {
|
||||
controlRateConfig->rates[axis] = 50;
|
||||
|
@ -401,10 +402,10 @@ static void resetConf(void)
|
|||
masterConfig.dcm_kp = 2500; // 1.0 * 10000
|
||||
masterConfig.dcm_ki = 0; // 0.003 * 10000
|
||||
masterConfig.gyro_lpf = 0; // 256HZ default
|
||||
masterConfig.gyro_sync_denom = 8;
|
||||
masterConfig.gyro_soft_lpf_hz = 80;
|
||||
masterConfig.gyro_sync_denom = 4;
|
||||
masterConfig.gyro_soft_lpf_hz = 100;
|
||||
|
||||
masterConfig.pid_process_denom = 1;
|
||||
masterConfig.pid_process_denom = 2;
|
||||
|
||||
masterConfig.debug_mode = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue