diff --git a/docs/OSD.md b/docs/OSD.md index 44084266f8f..7a976a2b0fc 100644 --- a/docs/OSD.md +++ b/docs/OSD.md @@ -192,7 +192,7 @@ Here are the OSD Elements provided by INAV. | 157 | OSD_CUSTOM_ELEMENT_7 | 8.0.0 | | | 158 | OSD_CUSTOM_ELEMENT_8 | 8.0.0 | | | 159 | OSD_LQ_DOWNLINK | 8.0.0 | | -| 160 | OSD_RX_POWER_DOWNLINK | 8.0.0 | | +| 160 | OSD_RX_POWER_DOWNLINK | 8.0.0 | The element will be hidden unless the RC link reports the transmit power of the receiver. CRSF does not send this value, it is available on MSP and MAVLink RC links. | | 161 | OSD_RX_BAND | 8.0.0 | | | 162 | OSD_RX_MODE | 8.0.0 | | | 163 | OSD_COURSE_TO_FENCE | 8.0.0 | | diff --git a/src/main/io/osd.c b/src/main/io/osd.c index e5bbcf49037..235a43a60c9 100644 --- a/src/main/io/osd.c +++ b/src/main/io/osd.c @@ -2845,6 +2845,13 @@ static bool osdDrawSingleElement(uint8_t item) case OSD_RX_POWER_DOWNLINK: { + // Only the MSP and MAVLink RC links report the transmit power of the receiver, the CRSF + // link statistics frame has no such field. Hide the element instead of showing a permanent 0. + if (rxLinkStatistics.downlinkTXPower == 0) { + displayWrite(osdDisplayPort, elemPosX, elemPosY, " "); + return false; + } + if (!failsafeIsReceivingRxData()) tfp_sprintf(buff, "%s%c%c", " ", SYM_MW, SYM_AH_DECORATION_DOWN); else