1
0
Fork 0
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:
Dominic Clifton 2015-05-19 23:45:27 +01:00
parent d0a9d14b87
commit 22bf890cf0

View file

@ -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;
}
} }
} }
} }