mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 15:25:36 +03:00
Set mid_rc for throttle checks in 3D
This commit is contained in:
parent
212017654b
commit
4b6f276d2b
1 changed files with 2 additions and 2 deletions
|
@ -786,11 +786,11 @@ void mixTable(void)
|
||||||
// Find min and max throttle based on condition
|
// Find min and max throttle based on condition
|
||||||
if (feature(FEATURE_3D)) {
|
if (feature(FEATURE_3D)) {
|
||||||
static int16_t throttleMinPrevious, throttleMaxPrevious, throttlePrevious;
|
static int16_t throttleMinPrevious, throttleMaxPrevious, throttlePrevious;
|
||||||
if (rcData[THROTTLE] <= (flight3DConfig->neutral3d - flight3DConfig->deadband3d_throttle)) {
|
if (rcData[THROTTLE] <= (rxConfig->midrc - flight3DConfig->deadband3d_throttle)) {
|
||||||
throttleMax = flight3DConfig->deadband3d_low;
|
throttleMax = flight3DConfig->deadband3d_low;
|
||||||
throttleMin = escAndServoConfig->minthrottle;
|
throttleMin = escAndServoConfig->minthrottle;
|
||||||
flightDirection3dReversed = true;
|
flightDirection3dReversed = true;
|
||||||
} else if (rcData[THROTTLE] >= (flight3DConfig->neutral3d + flight3DConfig->deadband3d_throttle)) {
|
} else if (rcData[THROTTLE] >= (rxConfig->midrc + flight3DConfig->deadband3d_throttle)) {
|
||||||
throttleMax = escAndServoConfig->maxthrottle;
|
throttleMax = escAndServoConfig->maxthrottle;
|
||||||
throttleMin = flight3DConfig->deadband3d_high;
|
throttleMin = flight3DConfig->deadband3d_high;
|
||||||
flightDirection3dReversed = false;
|
flightDirection3dReversed = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue