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

Changes in crash flip OSD warnings:

1. Show "ARMED"<new line>"> CRASH FLIP <" when arming in crash flip
2. Show "CRASH FLIP SWITCH" when disarmed, but in crash flip.
3. Hide the disarmed stats screen if "CRASH FLIP SWITCH" is activated.
This commit is contained in:
Ivan Efimov 2022-05-26 22:50:45 -05:00
parent aaece8915a
commit bb33c65f11
4 changed files with 24 additions and 7 deletions

View file

@ -60,6 +60,7 @@
#include "drivers/sdcard.h"
#include "drivers/time.h"
#include "fc/core.h"
#include "fc/rc_controls.h"
#include "fc/rc_modes.h"
#include "fc/runtime_config.h"
@ -79,6 +80,7 @@
#include "osd/osd.h"
#include "osd/osd_elements.h"
#include "osd/osd_warnings.h"
#include "pg/motor.h"
#include "pg/pg.h"
@ -1016,6 +1018,10 @@ static timeDelta_t osdShowArmed(void)
}
displayWrite(osdDisplayPort, 12, 7, DISPLAYPORT_ATTR_NONE, "ARMED");
if (isFlipOverAfterCrashActive()) {
displayWrite(osdDisplayPort, 8, 8, DISPLAYPORT_ATTR_NONE, CRASH_FLIP_WARNING);
}
return ret;
}
@ -1087,8 +1093,9 @@ void osdProcessStats2(timeUs_t currentTimeUs)
if (resumeRefreshAt) {
if (cmp32(currentTimeUs, resumeRefreshAt) < 0) {
// in timeout period, check sticks for activity to resume display.
if (IS_HI(THROTTLE) || IS_HI(PITCH)) {
// in timeout period, check sticks for activity or CRASH FLIP switch to resume display.
if (!ARMING_FLAG(ARMED) &&
(IS_HI(THROTTLE) || IS_HI(PITCH) || IS_RC_MODE_ACTIVE(BOXFLIPOVERAFTERCRASH))) {
resumeRefreshAt = currentTimeUs;
}
return;