1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

Some cleanups

Fix missing bracket
This commit is contained in:
borisbstyle 2016-02-24 23:42:14 +01:00
parent df159d195d
commit 127251cc99
5 changed files with 4 additions and 14 deletions

View file

@ -113,13 +113,12 @@ void setGyroSamplingSpeed(uint16_t looptime) {
masterConfig.gyro_lpf = 0;
gyroSampleRate = 125;
maxDivider = 8;
masterConfig.pid_process_denom = 1;
if (looptime < 250) {
masterConfig.acc_hardware = 1;
masterConfig.baro_hardware = 1;
masterConfig.mag_hardware = 1;
masterConfig.pid_process_denom = 2;
} else if (looptime < 1000) {
masterConfig.pid_process_denom = 1;
}
} else {
masterConfig.gyro_lpf = 1;
@ -133,6 +132,7 @@ void setGyroSamplingSpeed(uint16_t looptime) {
masterConfig.mag_hardware = 1;
gyroSampleRate = 125;
maxDivider = 8;
masterConfig.pid_process_denom = 1;
if (looptime < 250) {
masterConfig.pid_process_denom = 3;
} else if (looptime < 500) {
@ -141,12 +141,6 @@ void setGyroSamplingSpeed(uint16_t looptime) {
} else {
masterConfig.pid_process_denom = 2;
}
} else {
if (currentProfile->pidProfile.pidController == 2) {
masterConfig.pid_process_denom = 2;
} else {
masterConfig.pid_process_denom = 1;
}
}
} else {
masterConfig.gyro_lpf = 1;