Skip to content

Commit

Permalink
Added RX band and mode elements
Browse files Browse the repository at this point in the history
  • Loading branch information
MrD-RC committed Nov 4, 2024
1 parent 5b6f691 commit 4fa7acd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/drivers/osd_symbols.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@
#define SYM_AH_CH_CENTER 0x166 // 358 Crossair center
#define SYM_FLIGHT_DIST_REMAINING 0x167 // 359 Flight distance reminaing
#define SYM_ODOMETER 0x168 // 360 Odometer
#define SYM_RX_BAND 0x169 // 361 RX Band
#define SYM_RX_MODE 0x16A // 362 RX Mode

#define SYM_AH_CH_TYPE3 0x190 // 400 to 402, crosshair 3
#define SYM_AH_CH_TYPE4 0x193 // 403 to 405, crosshair 4
Expand Down
11 changes: 11 additions & 0 deletions src/main/io/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2583,6 +2583,15 @@ static bool osdDrawSingleElement(uint8_t item)
tfp_sprintf(buff, "%4d%c%c", rxLinkStatistics.downlinkTXPower, SYM_MW, SYM_AH_DECORATION_DOWN);
break;
}
case OSD_RX_BAND:
displayWriteChar(osdDisplayPort, elemPosX++, elemPosY, SYM_RX_BAND);
strcat(buff, rxLinkStatistics.band);
break;

case OSD_RX_MODE:
displayWriteChar(osdDisplayPort, elemPosX++, elemPosY, SYM_RX_MODE);
strcat(buff, rxLinkStatistics.mode);
break;
#endif

case OSD_FORMATION_FLIGHT:
Expand Down Expand Up @@ -4181,6 +4190,8 @@ void pgResetFn_osdLayoutsConfig(osdLayoutsConfig_t *osdLayoutsConfig)
osdLayoutsConfig->item_pos[0][OSD_SNR_DB] = OSD_POS(24, 9);
osdLayoutsConfig->item_pos[0][OSD_TX_POWER_UPLINK] = OSD_POS(24, 10);
osdLayoutsConfig->item_pos[0][OSD_RX_POWER_DOWNLINK] = OSD_POS(24, 11);
osdLayoutsConfig->item_pos[0][OSD_RX_BAND] = OSD_POS(24, 12);
osdLayoutsConfig->item_pos[0][OSD_RX_MODE] = OSD_POS(24, 13);
#endif

osdLayoutsConfig->item_pos[0][OSD_ONTIME] = OSD_POS(23, 8);
Expand Down
2 changes: 2 additions & 0 deletions src/main/io/osd.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ typedef enum {
OSD_CUSTOM_ELEMENT_8,
OSD_LQ_DOWNLINK,
OSD_RX_POWER_DOWNLINK, // 160
OSD_RX_BAND,
OSD_RX_MODE,
OSD_ITEM_COUNT // MUST BE LAST
} osd_items_e;

Expand Down

0 comments on commit 4fa7acd

Please sign in to comment.