diff --git a/docs/Programming Framework.md b/docs/Programming Framework.md index 89e3cdf2e1c..f0d5db54633 100644 --- a/docs/Programming Framework.md +++ b/docs/Programming Framework.md @@ -84,7 +84,7 @@ for complete documentation on using JavaScript to program your flight controller | 19 | Increase GVAR | Increase the GVAR indexed by `Operand A` (use `Value 1` for Global Variable 1) with value from `Operand B` | | 20 | Decrease GVAR | Decrease the GVAR indexed by `Operand A` (use `Value 1` for Global Variable 1) with value from `Operand B` | | 21 | Set IO Port | Set I2C IO Expander pin `Operand A` to value of `Operand B`. `Operand A` accepts values `0-7` and `Operand B` accepts `0` and `1` | -| 22 | Override Arming Safety | Allows the craft to arm on any angle even without GPS fix. WARNING: This bypasses all safety checks, even that the throttle is low, so use with caution. If you only want to check for certain conditions, such as arm without GPS fix. You will need to add logic conditions to check the throttle is low. | +| 22 | Override Arming Safety | Allows the craft to arm on any angle even without GPS fix. WARNING: This bypasses all safety checks, even that the throttle is low, so use with caution. If you only want to check for certain conditions, such as arm without GPS fix. You will need to add logic conditions to check the throttle is low. It does not override the failsafe arming lockout that follows a failsafe disarm. | | 23 | Override Throttle Scale | Override throttle scale to the value defined by operand. Operand type `0` and value `50` means throttle will be scaled by 50%. | | 24 | Swap Roll & Yaw | basically, when activated, yaw stick will control roll and roll stick will control yaw. Required for tail-sitters VTOL during vertical-horizonral transition when body frame changes | | 25 | Set VTx Power Level | Sets VTX power level. Accepted values are `0-3` for SmartAudio and `0-4` for Tramp protocol | diff --git a/src/main/fc/fc_core.c b/src/main/fc/fc_core.c index 0b0a20a729f..69b60a85feb 100644 --- a/src/main/fc/fc_core.c +++ b/src/main/fc/fc_core.c @@ -617,7 +617,9 @@ void tryArm(void) #ifdef USE_PROGRAMMING_FRAMEWORK if (emergInflightRearmEnabled() || !isArmingDisabled() || emergencyArmingIsEnabled() || - LOGIC_CONDITION_GLOBAL_FLAG(LOGIC_CONDITION_GLOBAL_FLAG_OVERRIDE_ARMING_SAFETY)) { + // The failsafe lockout must survive the override, or it re-arms right after a failsafe disarm + (LOGIC_CONDITION_GLOBAL_FLAG(LOGIC_CONDITION_GLOBAL_FLAG_OVERRIDE_ARMING_SAFETY) && + !ARMING_FLAG(ARMING_DISABLED_FAILSAFE_SYSTEM))) { #else if (emergInflightRearmEnabled() || !isArmingDisabled() || emergencyArmingIsEnabled()) { #endif