From a3fb5cc15659d333b6d9960d30510780f33f0d37 Mon Sep 17 00:00:00 2001 From: Bruce Luckcuck Date: Wed, 3 Oct 2018 17:39:59 -0400 Subject: [PATCH] Add HEADFREE indicator to the OSD flight mode and warnings display elements Provide multiple mechanisms to alert the pilot that he is attempting to fly in HEADFREE mode while in FPV - which will likely result in disorientation and loss of control. --- src/main/io/osd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/io/osd.c b/src/main/io/osd.c index a20e60c77..0dff21e74 100644 --- a/src/main/io/osd.c +++ b/src/main/io/osd.c @@ -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) {