From bf232e57d987a8eb1c31dcd4915c4db16e1df9a4 Mon Sep 17 00:00:00 2001 From: Bruce Luckcuck Date: Fri, 10 Jul 2020 09:20:47 -0400 Subject: [PATCH] Prevent crash flip from setting WAS_EVER_ARMED arming flag Previously if the first "arming" was in crash-flip mode then the various features that rely on "first arming" logic would be defeated. While arming in crash-flip mode is technically "arming", it shouldn't disable features that rely on the first "real" arming. For example, vtx low-power disarm, GPS fix arming disabled, `BATT < FULL` warning, etc. --- src/main/fc/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/fc/core.c b/src/main/fc/core.c index b0032dadf8..dc2b052d2f 100644 --- a/src/main/fc/core.c +++ b/src/main/fc/core.c @@ -433,7 +433,9 @@ void updateArmingStatus(void) void disarm(flightLogDisarmReason_e reason) { if (ARMING_FLAG(ARMED)) { - ENABLE_ARMING_FLAG(WAS_EVER_ARMED); + if (!flipOverAfterCrashActive) { + ENABLE_ARMING_FLAG(WAS_EVER_ARMED); + } DISABLE_ARMING_FLAG(ARMED); lastDisarmTimeUs = micros();