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

New defaults auto looptime settings

This commit is contained in:
borisbstyle 2016-02-27 00:36:32 +01:00
parent bc2627b48f
commit 35ce724a22
2 changed files with 11 additions and 5 deletions

View file

@ -117,11 +117,16 @@ void setGyroSamplingSpeed(uint16_t looptime) {
masterConfig.acc_hardware = 0;
masterConfig.baro_hardware = 0;
masterConfig.mag_hardware = 0;
if (looptime < 375) {
if (looptime < 250) {
masterConfig.acc_hardware = 1;
masterConfig.baro_hardware = 1;
masterConfig.mag_hardware = 1;
masterConfig.pid_process_denom = 2;
} else if (looptime < 375) {
masterConfig.acc_hardware = 0;
masterConfig.baro_hardware = 0;
masterConfig.mag_hardware = 0;
masterConfig.pid_process_denom = 2;
}
} else {
masterConfig.gyro_lpf = 1;
@ -150,7 +155,9 @@ void setGyroSamplingSpeed(uint16_t looptime) {
} else {
masterConfig.pid_process_denom = 2;
}
#ifndef CC3D
masterConfig.emf_avoidance = 1;
#endif
}
} else {
masterConfig.gyro_lpf = 1;