Merge pull request #6580 from jflyper/bfdev-fix-osd-flymode-precedence

OSD GPS RESCUE has display precedence over other modes except FS
This commit is contained in:
Michael Keller 2018-08-20 16:40:52 +12:00 committed by GitHub
commit 1d63edf7c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -589,14 +589,21 @@ static bool osdDrawSingleElement(uint8_t item)
case OSD_FLYMODE:
{
// Note that flight mode display has precedence in what to display.
// 1. FS
// 2. GPS RESCUE
// 3. ANGLE, HORIZON, ACRO TRAINER
// 4. AIR
// 5. ACRO
if (FLIGHT_MODE(FAILSAFE_MODE)) {
strcpy(buff, "!FS!");
} else if (FLIGHT_MODE(GPS_RESCUE_MODE)) {
strcpy(buff, "RESC");
} else if (FLIGHT_MODE(ANGLE_MODE)) {
strcpy(buff, "STAB");
} else if (FLIGHT_MODE(HORIZON_MODE)) {
strcpy(buff, "HOR ");
} else if (FLIGHT_MODE(GPS_RESCUE_MODE)) {
strcpy(buff, "RESC");
} else if (IS_RC_MODE_ACTIVE(BOXACROTRAINER)) {
strcpy(buff, "ATRN");
} else if (isAirmodeActive()) {