mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 22:35:23 +03:00
New Auto config defaults motor value
This commit is contained in:
parent
977fec408a
commit
10b629c736
1 changed files with 2 additions and 5 deletions
|
@ -166,11 +166,8 @@ void setGyroSamplingSpeed(uint16_t looptime) {
|
|||
|
||||
if (looptime < 1000) {
|
||||
masterConfig.force_motor_pwm_rate = 1;
|
||||
if (masterConfig.use_multiShot || masterConfig.use_oneshot42) {
|
||||
masterConfig.motor_pwm_rate = 4200;
|
||||
} else {
|
||||
masterConfig.motor_pwm_rate = 2700;
|
||||
}
|
||||
masterConfig.motor_pwm_rate = lrintf(1.0f / (gyroSampleRate * masterConfig.gyro_sync_denom * masterConfig.pid_process_denom * 0.000001f)) + 100;
|
||||
if (!(masterConfig.use_multiShot || masterConfig.use_oneshot42)) masterConfig.motor_pwm_rate = constrain(masterConfig.motor_pwm_rate, 1000, 3800);
|
||||
} else {
|
||||
masterConfig.force_motor_pwm_rate = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue