mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Add configurable boot grace time
This guards against the case when the RX takes longer to obtain a valid link than the gyro takes to calibrate (previously this delay is all that stopped immediate arming).
This commit is contained in:
parent
fd51cda9eb
commit
0c0483d020
8 changed files with 48 additions and 22 deletions
|
@ -152,6 +152,12 @@ void updateArmingStatus(void)
|
|||
if (ARMING_FLAG(ARMED)) {
|
||||
LED0_ON;
|
||||
} else {
|
||||
// Check if the power on arming grace time has elapsed
|
||||
if ((getArmingDisableFlags() & ARMING_DISABLED_BOOT_GRACE_TIME) && (millis() >= systemConfig()->powerOnArmingGraceTime * 1000)) {
|
||||
// If so, unset the grace time arming disable flag
|
||||
unsetArmingDisabled(ARMING_DISABLED_BOOT_GRACE_TIME);
|
||||
}
|
||||
|
||||
if (IS_RC_MODE_ACTIVE(BOXFAILSAFE)) {
|
||||
setArmingDisabled(ARMING_DISABLED_BOXFAILSAFE);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue