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

Refactored 'WAS_EVER_ARMED' arming flag to be only enabled on f… (#9248)

Refactored 'WAS_EVER_ARMED' arming flag to be only enabled on first disarm.
This commit is contained in:
Michael Keller 2019-12-01 15:14:02 +13:00 committed by GitHub
commit 9425831756
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 95 additions and 64 deletions

View file

@ -826,18 +826,18 @@ static void osdRefreshStats(void)
static timeDelta_t osdShowArmed(void)
{
static bool everArmed = false;
timeDelta_t ret;
displayClearScreen(osdDisplayPort);
if ((osdConfig()->logo_on_arming == OSD_LOGO_ARMING_ON) || ((osdConfig()->logo_on_arming == OSD_LOGO_ARMING_FIRST) && !everArmed)) {
if ((osdConfig()->logo_on_arming == OSD_LOGO_ARMING_ON) || ((osdConfig()->logo_on_arming == OSD_LOGO_ARMING_FIRST) && !ARMING_FLAG(WAS_EVER_ARMED))) {
osdDrawLogo(3, 1);
ret = osdConfig()->logo_on_arming_duration * 1e5;
} else {
ret = (REFRESH_1S / 2);
}
displayWrite(osdDisplayPort, 12, 7, DISPLAYPORT_ATTR_NONE, "ARMED");
everArmed = true;
return ret;
}