Skip to content

Commit 0c5754f

Browse files
authored
Merge pull request #10589 from iNavFlight/mmosca-dji-fix-this
A little reminder on the OSD
2 parents f0fcd15 + 2b488e7 commit 0c5754f

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

src/main/io/displayport_msp_dji_compat.c

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@
2424
#include "io/displayport_msp_dji_compat.h"
2525
#include "io/dji_osd_symbols.h"
2626
#include "drivers/osd_symbols.h"
27+
#include <string.h>
28+
29+
// 0123456789
30+
static char *dji_logo = " DJI, FIX "
31+
" THE OSD "
32+
" FOR O3 "
33+
" AND O4 ";
2734

2835
uint8_t getDJICharacter(uint8_t ch, uint8_t page)
2936
{
@@ -37,6 +44,14 @@ uint8_t getDJICharacter(uint8_t ch, uint8_t page)
3744
return DJI_SYM_AH_DECORATION;
3845
}
3946

47+
if (ech >= SYM_LOGO_START && ech <= 297) {
48+
return dji_logo[(ech - SYM_LOGO_START) % (strlen(dji_logo) + 1)];
49+
}
50+
51+
if (ech >= SYM_PILOT_LOGO_LRG_START && ech <= 511) {
52+
return dji_logo[(ech - SYM_LOGO_START) % (strlen(dji_logo) + 1)];
53+
}
54+
4055
switch (ech) {
4156
case SYM_RSSI:
4257
return DJI_SYM_RSSI;
@@ -452,16 +467,8 @@ uint8_t getDJICharacter(uint8_t ch, uint8_t page)
452467
453468
case SYM_CROSS_TRACK_ERROR:
454469
return DJI_SYM_CROSS_TRACK_ERROR;
455-
456-
case SYM_LOGO_START:
457-
return DJI_SYM_LOGO_START;
458-
459-
case SYM_LOGO_WIDTH:
460-
return DJI_SYM_LOGO_WIDTH;
461-
462-
case SYM_LOGO_HEIGHT:
463-
return DJI_SYM_LOGO_HEIGHT;
464470
*/
471+
465472
case SYM_AH_LEFT:
466473
return DJI_SYM_AH_LEFT;
467474

src/main/io/osd.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4401,18 +4401,11 @@ uint8_t drawLogos(bool singular, uint8_t row) {
44014401
bool usePilotLogo = (osdConfig()->use_pilot_logo && osdDisplayIsHD());
44024402
bool useINAVLogo = (singular && !usePilotLogo) || !singular;
44034403

4404-
#ifndef DISABLE_MSP_DJI_COMPAT // IF DJICOMPAT is in use, the pilot logo cannot be used, due to font issues.
4405-
if (isDJICompatibleVideoSystem(osdConfig())) {
4406-
usePilotLogo = false;
4407-
useINAVLogo = false;
4408-
}
4409-
#endif
4410-
44114404
uint8_t logoSpacing = osdConfig()->inav_to_pilot_logo_spacing;
44124405

44134406
if (logoSpacing > 0 && ((osdDisplayPort->cols % 2) != (logoSpacing % 2))) {
44144407
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
4415-
}
4408+
}
44164409

44174410
// Draw Logo(s)
44184411
if (usePilotLogo && !singular) {

0 commit comments

Comments
 (0)