1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-12 19:10:32 +03:00

RPM Limiter Patch (#12877)

initial commit
This commit is contained in:
Tanner Beard 2023-06-10 03:06:17 -04:00 committed by GitHub
parent 7d7b6596b0
commit 46ebf1fc97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -398,9 +398,7 @@ static void applyMixToMotors(float motorMix[MAX_SUPPORTED_MOTORS], motorMixer_t
for (int i = 0; i < mixerRuntime.motorCount; i++) { for (int i = 0; i < mixerRuntime.motorCount; i++) {
float motorOutput = motorOutputMixSign * motorMix[i] + throttle * activeMixer[i].throttle; float motorOutput = motorOutputMixSign * motorMix[i] + throttle * activeMixer[i].throttle;
#ifdef USE_THRUST_LINEARIZATION #ifdef USE_THRUST_LINEARIZATION
if (!RPM_LIMIT_ACTIVE) {
motorOutput = pidApplyThrustLinearization(motorOutput); motorOutput = pidApplyThrustLinearization(motorOutput);
}
#endif #endif
motorOutput = motorOutputMin + motorOutputRange * motorOutput; motorOutput = motorOutputMin + motorOutputRange * motorOutput;