mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
Better Clearing when toggling inbetween modes
This commit is contained in:
parent
0a2444fe39
commit
6d51ab6e53
2 changed files with 3 additions and 1 deletions
|
@ -751,6 +751,7 @@ void mixTable(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(IS_RC_MODE_ACTIVE(BOXAIRMODE)) && !(feature(FEATURE_3D))) {
|
if (!(IS_RC_MODE_ACTIVE(BOXAIRMODE)) && !(feature(FEATURE_3D))) {
|
||||||
|
totalErrorRatioLimit = 1.0f; // It always needs to be full ratio so it can't get stuck when flipping back and fourth
|
||||||
// motors for non-servo mixes
|
// motors for non-servo mixes
|
||||||
for (i = 0; i < motorCount; i++) {
|
for (i = 0; i < motorCount; i++) {
|
||||||
motor[i] =
|
motor[i] =
|
||||||
|
@ -794,7 +795,6 @@ void mixTable(void)
|
||||||
// roll/pitch/yaw. This could move throttle down, but also up for those low throttle flips.
|
// roll/pitch/yaw. This could move throttle down, but also up for those low throttle flips.
|
||||||
//
|
//
|
||||||
// TODO: handle the case when motors don't all get the same throttle factor...
|
// TODO: handle the case when motors don't all get the same throttle factor...
|
||||||
// too lazy to sort out the math right now.
|
|
||||||
for (i = 0; i < motorCount; i++) {
|
for (i = 0; i < motorCount; i++) {
|
||||||
motor[i] = rollPitchYawMix[i] + constrainf(rcCommand[THROTTLE] * currentMixer[i].throttle, throttleMin, throttleMax);
|
motor[i] = rollPitchYawMix[i] + constrainf(rcCommand[THROTTLE] * currentMixer[i].throttle, throttleMin, throttleMax);
|
||||||
}
|
}
|
||||||
|
|
|
@ -598,6 +598,8 @@ void processRx(void)
|
||||||
} else {
|
} else {
|
||||||
allowITermShrinkOnly = false; // Reset shrinking for Iterm
|
allowITermShrinkOnly = false; // Reset shrinking for Iterm
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
allowITermShrinkOnly = false; // Reset shrinking. Usefull when flipping between normal and AIR mode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue