1
0
Fork 0
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:
Dominic Clifton 2015-03-09 23:42:18 +01:00
parent 5e3734946e
commit 1b1163da10
3 changed files with 4 additions and 1 deletions

View file

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

View file

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