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

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.
This commit is contained in:
Bruce Luckcuck 2020-07-10 09:20:47 -04:00
parent 7bb2c26c43
commit bf232e57d9

View file

@ -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();