Skip to content

Commit

Permalink
Make band and mode left aligned
Browse files Browse the repository at this point in the history
  • Loading branch information
MrD-RC committed Nov 9, 2024
1 parent 026ca58 commit 619948e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/io/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2585,13 +2585,19 @@ static bool osdDrawSingleElement(uint8_t item)
}
case OSD_RX_BAND:
displayWriteChar(osdDisplayPort, elemPosX++, elemPosY, SYM_RX_BAND);
tfp_sprintf(buff, "%4s", rxLinkStatistics.band);
strcat(buff, rxLinkStatistics.band);
if (strlen(rxLinkStatistics.band) < 4)
for (uint8_t i = strlen(rxLinkStatistics.band); i < 4; i++)
buff[i] = ' ';
buff[4] = '\0';
break;

case OSD_RX_MODE:
displayWriteChar(osdDisplayPort, elemPosX++, elemPosY, SYM_RX_MODE);
tfp_sprintf(buff, "%6s", rxLinkStatistics.mode);
strcat(buff, rxLinkStatistics.mode);
if (strlen(rxLinkStatistics.mode) < 6)
for (uint8_t i = strlen(rxLinkStatistics.mode); i < 6; i++)
buff[i] = ' ';
buff[6] = '\0';
break;
#endif
Expand Down

0 comments on commit 619948e

Please sign in to comment.