mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Removed VBat PID compensation.
This commit is contained in:
parent
97ad043f9e
commit
b6689edc26
13 changed files with 7 additions and 27 deletions
|
@ -827,7 +827,7 @@ static void updateDynLpfCutoffs(timeUs_t currentTimeUs, float throttle)
|
|||
}
|
||||
#endif
|
||||
|
||||
FAST_CODE_NOINLINE void mixTable(timeUs_t currentTimeUs, uint8_t vbatPidCompensation)
|
||||
FAST_CODE_NOINLINE void mixTable(timeUs_t currentTimeUs)
|
||||
{
|
||||
// Find min and max throttle based on conditions. Throttle has to be known before mixing
|
||||
calculateThrottleAndCurrentMotorEndpoints(currentTimeUs);
|
||||
|
@ -869,9 +869,6 @@ FAST_CODE_NOINLINE void mixTable(timeUs_t currentTimeUs, uint8_t vbatPidCompensa
|
|||
scaledAxisPidYaw = -scaledAxisPidYaw;
|
||||
}
|
||||
|
||||
// Calculate voltage compensation
|
||||
const float vbatCompensationFactor = vbatPidCompensation ? calculateVbatPidCompensation() : 1.0f;
|
||||
|
||||
// Apply the throttle_limit_percent to scale or limit the throttle based on throttle_limit_type
|
||||
if (currentControlRateProfile->throttle_limit_type != THROTTLE_LIMIT_TYPE_OFF) {
|
||||
throttle = applyThrottleLimit(throttle);
|
||||
|
@ -905,8 +902,6 @@ FAST_CODE_NOINLINE void mixTable(timeUs_t currentTimeUs, uint8_t vbatPidCompensa
|
|||
scaledAxisPidPitch * activeMixer[i].pitch +
|
||||
scaledAxisPidYaw * activeMixer[i].yaw;
|
||||
|
||||
mix *= vbatCompensationFactor; // Add voltage compensation
|
||||
|
||||
if (mix > motorMixMax) {
|
||||
motorMixMax = mix;
|
||||
} else if (mix < motorMixMin) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue