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:
commit
9425831756
5 changed files with 95 additions and 64 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue