mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-22 15:55:48 +03:00
Airmode Saturation fix // Needed for some setups
This commit is contained in:
parent
17f214d2ab
commit
06b3f625d1
1 changed files with 2 additions and 3 deletions
|
@ -789,10 +789,10 @@ void mixTable(void)
|
||||||
// Scale roll/pitch/yaw uniformly to fit within throttle range
|
// Scale roll/pitch/yaw uniformly to fit within throttle range
|
||||||
int16_t rollPitchYawMixRange = rollPitchYawMixMax - rollPitchYawMixMin;
|
int16_t rollPitchYawMixRange = rollPitchYawMixMax - rollPitchYawMixMin;
|
||||||
int16_t throttleRange, throttle;
|
int16_t throttleRange, throttle;
|
||||||
int16_t throttleMin, throttleMax;
|
int16_t throttleMin, throttleMax = 0;
|
||||||
static bool flightDirection3dReversed;
|
static bool flightDirection3dReversed;
|
||||||
|
|
||||||
throttle = rcData[THROTTLE];
|
throttle = rcCommand[THROTTLE];
|
||||||
|
|
||||||
// Find min and max throttle based on condition
|
// Find min and max throttle based on condition
|
||||||
if (feature(FEATURE_3D)) {
|
if (feature(FEATURE_3D)) {
|
||||||
|
@ -831,7 +831,6 @@ void mixTable(void)
|
||||||
for (i = 0; i < motorCount; i++) {
|
for (i = 0; i < motorCount; i++) {
|
||||||
rollPitchYawMix[i] = (rollPitchYawMix[i] * throttleRange) / rollPitchYawMixRange;
|
rollPitchYawMix[i] = (rollPitchYawMix[i] * throttleRange) / rollPitchYawMixRange;
|
||||||
}
|
}
|
||||||
throttleMin = throttleMax = throttleMin + (throttleRange / 2);
|
|
||||||
} else {
|
} else {
|
||||||
motorLimitReached = false;
|
motorLimitReached = false;
|
||||||
throttleMin = throttleMin + (rollPitchYawMixRange / 2);
|
throttleMin = throttleMin + (rollPitchYawMixRange / 2);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue