mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
Add guard time between dshot beacon and arming/disarming
Tries to prevent DSHOT beacon commands from interfering with commands to set the motor direction. Adds a 2 second delay after disarming before DSHOT beacon commands will be sent. This attempts to prevent the beacon commands from interfering with the motor direction reset that happens after using crash flip mode. During arming if a DSHOT beacon command has been sent within 2 seconds the arming will be delayed until the 2 seconds have passed. This attempts to prevent interference with the motor direction commands sent at arming.
This commit is contained in:
parent
504b1479fb
commit
1e6e9e719f
6 changed files with 62 additions and 1 deletions
|
@ -179,6 +179,7 @@ void processRcStickPositions()
|
|||
// Arming via ARM BOX
|
||||
tryArm();
|
||||
} else {
|
||||
resetTryingToArm();
|
||||
// Disarming via ARM BOX
|
||||
resetArmingDisabled();
|
||||
if (ARMING_FLAG(ARMED) && rxIsReceivingSignal() && !failsafeIsActive() ) {
|
||||
|
@ -192,6 +193,7 @@ void processRcStickPositions()
|
|||
if (rcDelayMs >= ARM_DELAY_MS && !doNotRepeat) {
|
||||
doNotRepeat = true;
|
||||
// Disarm on throttle down + yaw
|
||||
resetTryingToArm();
|
||||
if (ARMING_FLAG(ARMED))
|
||||
disarm();
|
||||
else {
|
||||
|
@ -214,11 +216,16 @@ void processRcStickPositions()
|
|||
if (!ARMING_FLAG(ARMED)) {
|
||||
// Arm via YAW
|
||||
tryArm();
|
||||
if (isTryingToArm()) {
|
||||
doNotRepeat = false;
|
||||
}
|
||||
} else {
|
||||
resetArmingDisabled();
|
||||
}
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
resetTryingToArm();
|
||||
}
|
||||
|
||||
if (ARMING_FLAG(ARMED) || doNotRepeat || rcDelayMs <= STICK_DELAY_MS || (getArmingDisableFlags() & ARMING_DISABLED_RUNAWAY_TAKEOFF)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue