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

Fix non DSHOT protocols

This commit is contained in:
Hans Christian Olaussen 2022-02-21 00:11:26 +01:00
parent 7b4415f062
commit 13cb7b4280
2 changed files with 3 additions and 6 deletions

View file

@ -306,12 +306,8 @@ void mixerInitProfile(void)
mixerRuntime.dynIdleDGain = currentPidProfile->dyn_idle_d_gain * 0.0000003f * pidGetPidFrequency();
mixerRuntime.dynIdleMaxIncrease = currentPidProfile->dyn_idle_max_increase * 0.001f;
mixerRuntime.minRpsDelayK = 800 * pidGetDT() / 20.0f; //approx 20ms D delay, arbitrarily suits many motors
if (!mixerRuntime.feature3dEnabled ) {
if (mixerRuntime.dynIdleMinRps) {
mixerRuntime.motorOutputLow = DSHOT_MIN_THROTTLE;
} else {
mixerRuntime.motorOutputLow = DSHOT_MIN_THROTTLE + mixerRuntime.idleThrottleOffset * DSHOT_RANGE;
}
if (!mixerRuntime.feature3dEnabled && mixerRuntime.dynIdleMinRps) {
mixerRuntime.motorOutputLow = DSHOT_MIN_THROTTLE; // Override value set by initEscEndpoints to allow zero motor drive
}
#endif