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:
parent
bc2627b48f
commit
35ce724a22
2 changed files with 11 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue