mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 01:05:27 +03:00
Change crash-flip OSD message to track actual state rather than switch
Previously the OSD crash-flip warning would only track the state of the activation switch. So if the switch was disabled but still armed the message would go away, but the quad was still in active crash-flip mode until it was disarmed. This change makes the OSD message follow the actual internal state for crash-flip.
This commit is contained in:
parent
bdd408354f
commit
4185756baf
2 changed files with 7 additions and 2 deletions
|
@ -57,6 +57,7 @@
|
|||
#include "drivers/time.h"
|
||||
|
||||
#include "fc/config.h"
|
||||
#include "fc/fc_core.h"
|
||||
#include "fc/rc_adjustments.h"
|
||||
#include "fc/rc_controls.h"
|
||||
#include "fc/runtime_config.h"
|
||||
|
@ -655,8 +656,7 @@ static bool osdDrawSingleElement(uint8_t item)
|
|||
|
||||
// Warn when in flip over after crash mode
|
||||
if ((enabledWarnings & OSD_WARNING_CRASH_FLIP)
|
||||
&& (isModeActivationConditionPresent(BOXFLIPOVERAFTERCRASH))
|
||||
&& IS_RC_MODE_ACTIVE(BOXFLIPOVERAFTERCRASH)) {
|
||||
&& (isFlipOverAfterCrashMode())) {
|
||||
osdFormatMessage(buff, sizeof(buff), "CRASH FLIP");
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue