mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +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
This commit is contained in:
parent
1b1163da10
commit
acabbf41db
4 changed files with 30 additions and 8 deletions
|
@ -525,12 +525,10 @@ void processRx(void)
|
|||
}
|
||||
// When armed and motors aren't spinning, disarm board after delay so users without buzzer won't lose fingers.
|
||||
// mixTable constrains motor commands, so checking throttleStatus is enough
|
||||
if (
|
||||
ARMING_FLAG(ARMED)
|
||||
if (ARMING_FLAG(ARMED)
|
||||
&& feature(FEATURE_MOTOR_STOP) && !STATE(FIXED_WING)
|
||||
&& masterConfig.auto_disarm_delay != 0
|
||||
&& areUsingSticksToArm()
|
||||
) {
|
||||
&& isUsingSticksForArming()) {
|
||||
if (throttleStatus == THROTTLE_LOW) {
|
||||
if ((int32_t)(disarmAt - millis()) < 0) // delay is over
|
||||
mwDisarm();
|
||||
|
@ -705,11 +703,12 @@ void loop(void)
|
|||
// If we're armed, at minimum throttle, and we do arming via the
|
||||
// sticks, do not process yaw input from the rx. We do this so the
|
||||
// motors do not spin up while we are trying to arm or disarm.
|
||||
if (areUsingSticksToArm() &&
|
||||
if (isUsingSticksForArming() &&
|
||||
rcData[THROTTLE] <= masterConfig.rxConfig.mincheck) {
|
||||
rcCommand[YAW] = 0;
|
||||
}
|
||||
|
||||
|
||||
if (currentProfile->throttle_correction_value && (FLIGHT_MODE(ANGLE_MODE) || FLIGHT_MODE(HORIZON_MODE))) {
|
||||
rcCommand[THROTTLE] += calculateThrottleAngleCorrection(currentProfile->throttle_correction_value);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue