diff --git a/src/main/io/displayport_msp_dji_compat.c b/src/main/io/displayport_msp_dji_compat.c index fbd7445f65..74805fa059 100644 --- a/src/main/io/displayport_msp_dji_compat.c +++ b/src/main/io/displayport_msp_dji_compat.c @@ -24,6 +24,13 @@ #include "io/displayport_msp_dji_compat.h" #include "io/dji_osd_symbols.h" #include "drivers/osd_symbols.h" +#include + +// 0123456789 +static char *dji_logo = " DJI, FIX " + " THE OSD " + " FOR O3 " + " AND O4 "; uint8_t getDJICharacter(uint8_t ch, uint8_t page) { @@ -37,6 +44,14 @@ uint8_t getDJICharacter(uint8_t ch, uint8_t page) return DJI_SYM_AH_DECORATION; } + if (ech >= SYM_LOGO_START && ech <= 297) { + return dji_logo[(ech - SYM_LOGO_START) % (strlen(dji_logo) + 1)]; + } + + if (ech >= SYM_PILOT_LOGO_LRG_START && ech <= 511) { + return dji_logo[(ech - SYM_LOGO_START) % (strlen(dji_logo) + 1)]; + } + switch (ech) { case SYM_RSSI: return DJI_SYM_RSSI; @@ -452,16 +467,8 @@ uint8_t getDJICharacter(uint8_t ch, uint8_t page) case SYM_CROSS_TRACK_ERROR: return DJI_SYM_CROSS_TRACK_ERROR; - - case SYM_LOGO_START: - return DJI_SYM_LOGO_START; - - case SYM_LOGO_WIDTH: - return DJI_SYM_LOGO_WIDTH; - - case SYM_LOGO_HEIGHT: - return DJI_SYM_LOGO_HEIGHT; */ + case SYM_AH_LEFT: return DJI_SYM_AH_LEFT; diff --git a/src/main/io/osd.c b/src/main/io/osd.c index 743dc5f83d..a88bfc0012 100644 --- a/src/main/io/osd.c +++ b/src/main/io/osd.c @@ -4401,18 +4401,11 @@ uint8_t drawLogos(bool singular, uint8_t row) { bool usePilotLogo = (osdConfig()->use_pilot_logo && osdDisplayIsHD()); bool useINAVLogo = (singular && !usePilotLogo) || !singular; -#ifndef DISABLE_MSP_DJI_COMPAT // IF DJICOMPAT is in use, the pilot logo cannot be used, due to font issues. - if (isDJICompatibleVideoSystem(osdConfig())) { - usePilotLogo = false; - useINAVLogo = false; - } -#endif - uint8_t logoSpacing = osdConfig()->inav_to_pilot_logo_spacing; if (logoSpacing > 0 && ((osdDisplayPort->cols % 2) != (logoSpacing % 2))) { logoSpacing++; // Add extra 1 character space between logos, if the odd/even of the OSD cols doesn't match the odd/even of the logo spacing -} + } // Draw Logo(s) if (usePilotLogo && !singular) {