From 4fa7acd25e055856b4bbdb1e780fa9b84a64aed9 Mon Sep 17 00:00:00 2001 From: Mr D - RC Date: Mon, 4 Nov 2024 22:30:46 +0000 Subject: [PATCH] Added RX band and mode elements --- src/main/drivers/osd_symbols.h | 2 ++ src/main/io/osd.c | 11 +++++++++++ src/main/io/osd.h | 2 ++ 3 files changed, 15 insertions(+) diff --git a/src/main/drivers/osd_symbols.h b/src/main/drivers/osd_symbols.h index 90c0bc97131..fe673c93a57 100644 --- a/src/main/drivers/osd_symbols.h +++ b/src/main/drivers/osd_symbols.h @@ -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 diff --git a/src/main/io/osd.c b/src/main/io/osd.c index 71081843c78..a7f9f024868 100644 --- a/src/main/io/osd.c +++ b/src/main/io/osd.c @@ -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: @@ -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); diff --git a/src/main/io/osd.h b/src/main/io/osd.h index da2c9bb015c..c57bd62f640 100644 --- a/src/main/io/osd.h +++ b/src/main/io/osd.h @@ -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;