mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 14:55:21 +03:00
Previously, at minimum throttle, the quad would do absolutely no self-leveling
and simply run the motors at constant minthrottle. This allowed the chance for the quad to lose control during flight if the throttle was set to minimum, say, to drop from a high altitude to a lower one. With this edit, the quad will still self-level at minimum throttle when armed, allowing for safe decents from altitude. To prevent motors spinning when arming/disarming, the yaw input is ignored if the throttle is at minimum and we're using the sticks to arm/disarm. Conflicts: src/main/flight/mixer.c added cli command disable_pid_at_min_throttle (same as previous)
This commit is contained in:
parent
5e3734946e
commit
1b1163da10
3 changed files with 4 additions and 1 deletions
|
@ -380,6 +380,7 @@ static void resetConf(void)
|
||||||
masterConfig.small_angle = 25;
|
masterConfig.small_angle = 25;
|
||||||
masterConfig.disable_pid_at_min_throttle = 0;
|
masterConfig.disable_pid_at_min_throttle = 0;
|
||||||
|
|
||||||
|
|
||||||
masterConfig.airplaneConfig.flaps_speed = 0;
|
masterConfig.airplaneConfig.flaps_speed = 0;
|
||||||
masterConfig.airplaneConfig.fixedwing_althold_dir = 1;
|
masterConfig.airplaneConfig.fixedwing_althold_dir = 1;
|
||||||
|
|
||||||
|
|
|
@ -701,6 +701,8 @@ void mixTable(void)
|
||||||
if ((rcData[THROTTLE]) < rxConfig->mincheck) {
|
if ((rcData[THROTTLE]) < rxConfig->mincheck) {
|
||||||
if (feature(FEATURE_MOTOR_STOP)) {
|
if (feature(FEATURE_MOTOR_STOP)) {
|
||||||
motor[i] = escAndServoConfig->mincommand;
|
motor[i] = escAndServoConfig->mincommand;
|
||||||
|
} else if (masterConfig.disable_pid_at_min_throttle != 0) {
|
||||||
|
motor[i] = escAndServoConfig->minthrottle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue