Skip to content

Commit 864bb15

Browse files
authored
Merge pull request #10055 from iNavFlight/dzikuvx-no-inav-logo-on-dji
Do not render INAV logo on DJI compat mode
2 parents 1a4b7c0 + 3efb86c commit 864bb15

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/main/io/osd.c

+13-6
Original file line numberDiff line numberDiff line change
@@ -4143,10 +4143,13 @@ uint8_t drawLogos(bool singular, uint8_t row) {
41434143
uint8_t logoRow = row;
41444144
uint8_t logoColOffset = 0;
41454145
bool usePilotLogo = (osdConfig()->use_pilot_logo && osdDisplayIsHD());
4146+
bool useINAVLogo = (singular && !usePilotLogo) || !singular;
41464147

41474148
#ifndef DISABLE_MSP_DJI_COMPAT // IF DJICOMPAT is in use, the pilot logo cannot be used, due to font issues.
4148-
if (isDJICompatibleVideoSystem(osdConfig()))
4149+
if (isDJICompatibleVideoSystem(osdConfig())) {
41494150
usePilotLogo = false;
4151+
useINAVLogo = false;
4152+
}
41504153
#endif
41514154

41524155
uint8_t logoSpacing = osdConfig()->inav_to_pilot_logo_spacing;
@@ -4163,7 +4166,7 @@ uint8_t drawLogos(bool singular, uint8_t row) {
41634166
}
41644167

41654168
// Draw INAV logo
4166-
if ((singular && !usePilotLogo) || !singular) {
4169+
if (useINAVLogo) {
41674170
unsigned logo_c = SYM_LOGO_START;
41684171
uint8_t logo_x = logoColOffset;
41694172
for (uint8_t lRow = 0; lRow < SYM_LOGO_HEIGHT; lRow++) {
@@ -4181,9 +4184,9 @@ uint8_t drawLogos(bool singular, uint8_t row) {
41814184
logoRow = row;
41824185
if (singular) {
41834186
logo_x = logoColOffset;
4184-
} else {
4185-
logo_x = logoColOffset + SYM_LOGO_WIDTH + logoSpacing;
4186-
}
4187+
} else {
4188+
logo_x = logoColOffset + SYM_LOGO_WIDTH + logoSpacing;
4189+
}
41874190

41884191
for (uint8_t lRow = 0; lRow < SYM_LOGO_HEIGHT; lRow++) {
41894192
for (uint8_t lCol = 0; lCol < SYM_LOGO_WIDTH; lCol++) {
@@ -4193,9 +4196,13 @@ uint8_t drawLogos(bool singular, uint8_t row) {
41934196
}
41944197
}
41954198

4196-
return logoRow;
4199+
if (!usePilotLogo && !useINAVLogo) {
4200+
logoRow += SYM_LOGO_HEIGHT;
41974201
}
41984202

4203+
return logoRow;
4204+
}
4205+
41994206
#ifdef USE_STATS
42004207
uint8_t drawStat_Stats(uint8_t statNameX, uint8_t row, uint8_t statValueX, bool isBootStats)
42014208
{

0 commit comments

Comments
 (0)