mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
Allow mixer to use failsafe throttle value that is less than
minthrottle.
This commit is contained in:
parent
d0a9d14b87
commit
22bf890cf0
1 changed files with 12 additions and 8 deletions
|
@ -704,14 +704,18 @@ void mixTable(void)
|
||||||
motor[i] = constrain(motor[i], escAndServoConfig->mincommand, flight3DConfig->deadband3d_low);
|
motor[i] = constrain(motor[i], escAndServoConfig->mincommand, flight3DConfig->deadband3d_low);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// If we're at minimum throttle and FEATURE_MOTOR_STOP enabled,
|
if (isFailsafeActive) {
|
||||||
// do not spin the motors.
|
motor[i] = constrain(motor[i], escAndServoConfig->mincommand, escAndServoConfig->maxthrottle);
|
||||||
motor[i] = constrain(motor[i], escAndServoConfig->minthrottle, escAndServoConfig->maxthrottle);
|
} else {
|
||||||
if ((rcData[THROTTLE]) < rxConfig->mincheck && !isFailsafeActive) {
|
// If we're at minimum throttle and FEATURE_MOTOR_STOP enabled,
|
||||||
if (feature(FEATURE_MOTOR_STOP)) {
|
// do not spin the motors.
|
||||||
motor[i] = escAndServoConfig->mincommand;
|
motor[i] = constrain(motor[i], escAndServoConfig->minthrottle, escAndServoConfig->maxthrottle);
|
||||||
} else if (mixerConfig->pid_at_min_throttle == 0) {
|
if ((rcData[THROTTLE]) < rxConfig->mincheck) {
|
||||||
motor[i] = escAndServoConfig->minthrottle;
|
if (feature(FEATURE_MOTOR_STOP)) {
|
||||||
|
motor[i] = escAndServoConfig->mincommand;
|
||||||
|
} else if (mixerConfig->pid_at_min_throttle == 0) {
|
||||||
|
motor[i] = escAndServoConfig->minthrottle;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue