Skip to content

Commit

Permalink
Merge pull request #10506 from iNavFlight/MrD_Show-craft-name-on-armi…
Browse files Browse the repository at this point in the history
…ng-screen-regardless-of-OSD-element-enabled
  • Loading branch information
mmosca authored Dec 8, 2024
2 parents a25df70 + 823e8ee commit bd4561f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/io/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -5346,12 +5346,14 @@ static void osdShowHDArmScreen(void)
armScreenRow = drawLogos(false, armScreenRow);
armScreenRow++;

if (!osdConfig()->use_pilot_logo && osdElementEnabled(OSD_PILOT_NAME, false) && strlen(systemConfig()->pilotName) > 0) {
memset(buf2, '\0', sizeof(buf2));
if (!osdConfig()->use_pilot_logo && strlen(systemConfig()->pilotName) > 0) {
osdFormatPilotName(buf2);
showPilotOrCraftName = true;
}

if (osdElementEnabled(OSD_CRAFT_NAME, false) && strlen(systemConfig()->craftName) > 0) {
memset(craftNameBuf, '\0', sizeof(craftNameBuf));
if (strlen(systemConfig()->craftName) > 0) {
osdFormatCraftName(craftNameBuf);
if (strlen(buf2) > 0) {
strcat(buf2, " : ");
Expand Down Expand Up @@ -5486,12 +5488,14 @@ static void osdShowSDArmScreen(void)
#endif
#endif

if (osdElementEnabled(OSD_PILOT_NAME, false) && strlen(systemConfig()->pilotName) > 0) {
memset(buf2, '\0', sizeof(buf2));
if (strlen(systemConfig()->pilotName) > 0) {
osdFormatPilotName(buf2);
showPilotOrCraftName = true;
}

if (osdElementEnabled(OSD_CRAFT_NAME, false) && strlen(systemConfig()->craftName) > 0) {
memset(craftNameBuf, '\0', sizeof(craftNameBuf));
if (strlen(systemConfig()->craftName) > 0) {
osdFormatCraftName(craftNameBuf);
if (strlen(buf2) > 0) {
strcat(buf2, " : ");
Expand Down

0 comments on commit bd4561f

Please sign in to comment.