New Auto config defaults motor value
This commit is contained in:
parent
977fec408a
commit
10b629c736
|
@ -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…
Reference in New Issue