Merge pull request #6877 from etracer65/headfree_osd_flightmode_display

Add HEADFREE indicator to the OSD flight mode and warnings display elements
This commit is contained in:
Michael Keller 2018-10-06 15:35:20 +13:00 committed by GitHub
commit 1c5568cd8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -627,6 +627,8 @@ static bool osdDrawSingleElement(uint8_t item)
strcpy(buff, "!FS!");
} else if (FLIGHT_MODE(GPS_RESCUE_MODE)) {
strcpy(buff, "RESC");
} else if (FLIGHT_MODE(HEADFREE_MODE)) {
strcpy(buff, "HEAD");
} else if (FLIGHT_MODE(ANGLE_MODE)) {
strcpy(buff, "STAB");
} else if (FLIGHT_MODE(HORIZON_MODE)) {
@ -797,6 +799,12 @@ static bool osdDrawSingleElement(uint8_t item)
break;
}
// Show warning if in HEADFREE flight mode
if (FLIGHT_MODE(HEADFREE_MODE)) {
osdFormatMessage(buff, OSD_FORMAT_MESSAGE_BUFFER_SIZE, "HEADFREE");
break;
}
#ifdef USE_ADC_INTERNAL
uint8_t coreTemperature = getCoreTemperatureCelsius();
if (osdWarnGetState(OSD_WARNING_CORE_TEMPERATURE) && coreTemperature >= osdConfig()->core_temp_alarm) {