1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 09:16:07 +03:00

Refactored 'WAS_EVER_ARMED' arming flag to be only enabled on first disarm.

This commit is contained in:
mikeller 2019-11-30 15:01:55 +13:00
parent 938f46ccd1
commit 93c708f57d
4 changed files with 6 additions and 6 deletions

View file

@ -425,6 +425,7 @@ void updateArmingStatus(void)
void disarm(void)
{
if (ARMING_FLAG(ARMED)) {
ENABLE_ARMING_FLAG(WAS_EVER_ARMED);
DISABLE_ARMING_FLAG(ARMED);
lastDisarmTimeUs = micros();
@ -519,7 +520,6 @@ void tryArm(void)
osdSuppressStats(false);
#endif
ENABLE_ARMING_FLAG(ARMED);
ENABLE_ARMING_FLAG(WAS_EVER_ARMED);
resetTryingToArm();