mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Unified warning activation conditions.
This commit is contained in:
parent
99eab92200
commit
286f21150c
6 changed files with 17 additions and 8 deletions
|
@ -483,7 +483,7 @@ static bool osdDrawSingleElement(uint8_t item)
|
|||
{
|
||||
const int angleR = attitude.values.roll / 10;
|
||||
const int angleP = attitude.values.pitch / 10; // still gotta update all angleR and angleP pointers.
|
||||
if (IS_RC_MODE_ACTIVE(BOXFLIPOVERAFTERCRASH)) {
|
||||
if (isFlipOverAfterCrashMode()) {
|
||||
if (angleP > 0 && ((angleR > 175 && angleR < 180) || (angleR > -180 && angleR < -175))) {
|
||||
buff[0] = SYM_ARROW_SOUTH;
|
||||
} else if (angleP > 0 && angleR > 0 && angleR < 175) {
|
||||
|
@ -946,7 +946,7 @@ static bool osdDrawSingleElement(uint8_t item)
|
|||
#endif
|
||||
|
||||
// Warn when in flip over after crash mode
|
||||
if (osdWarnGetState(OSD_WARNING_CRASH_FLIP) && IS_RC_MODE_ACTIVE(BOXFLIPOVERAFTERCRASH)) {
|
||||
if (osdWarnGetState(OSD_WARNING_CRASH_FLIP) && isFlipOverAfterCrashWarningActive()) {
|
||||
osdFormatMessage(buff, OSD_FORMAT_MESSAGE_BUFFER_SIZE, "CRASH FLIP");
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue