diff --git a/src/main/osd/osd.c b/src/main/osd/osd.c index 66fdb33e94..2e38f5bf97 100644 --- a/src/main/osd/osd.c +++ b/src/main/osd/osd.c @@ -643,8 +643,8 @@ static uint8_t osdShowStats(uint16_t endBatteryVoltage, int statsRowCount) #ifdef USE_RX_RSSI_DBM if (osdStatGetState(OSD_STAT_MIN_RSSI_DBM)) { - itoa(stats.min_rssi_dbm, buff, 10); - osdDisplayStatisticLabel(top++, "MAX RSSI DBM", buff); + tfp_sprintf(buff, "%3d", stats.min_rssi_dbm * -1); + osdDisplayStatisticLabel(top++, "MIN RSSI DBM", buff); } #endif diff --git a/src/main/osd/osd_elements.c b/src/main/osd/osd_elements.c index e985076ad5..509bc02663 100644 --- a/src/main/osd/osd_elements.c +++ b/src/main/osd/osd_elements.c @@ -1008,7 +1008,7 @@ static void osdElementRtcTime(osdElementParms_t *element) #ifdef USE_RX_RSSI_DBM static void osdElementRssiDbm(osdElementParms_t *element) { - tfp_sprintf(element->buff, "%c%3d", SYM_RSSI, getRssiDbm() * -1 ); + tfp_sprintf(element->buff, "%c%3d", SYM_RSSI, getRssiDbm() * -1); } #endif // USE_RX_RSSI_DBM diff --git a/src/main/rx/rx.c b/src/main/rx/rx.c index 4264f3208f..65b7e92ea8 100644 --- a/src/main/rx/rx.c +++ b/src/main/rx/rx.c @@ -72,7 +72,7 @@ const char rcChannelLetters[] = "AERT12345678abcdefgh"; static uint16_t rssi = 0; // range: [0;1023] -static uint8_t rssi_dbm = 130; // range: [0;130] +static uint8_t rssi_dbm = 130; // range: [0;130] display 0 to -130 static timeUs_t lastMspRssiUpdateUs = 0; static pt1Filter_t frameErrFilter; @@ -788,7 +788,7 @@ void setRssiDbm(uint8_t rssiDbmValue, rssiSource_e source) void setRssiDbmDirect(uint8_t newRssiDbm, rssiSource_e source) { - if (source != rssiSource) { // maybe the setting ? + if (source != rssiSource) { return; } diff --git a/src/main/target/common_post.h b/src/main/target/common_post.h index 6a032749ad..8eabd1dac3 100644 --- a/src/main/target/common_post.h +++ b/src/main/target/common_post.h @@ -94,6 +94,7 @@ #if !defined(USE_SERIALRX_CRSF) #undef USE_TELEMETRY_CRSF #undef USE_CRSF_LINK_STATISTICS +#undef USE_RX_RSSI_DBM #endif #if !defined(USE_TELEMETRY_CRSF) || !defined(USE_CMS) diff --git a/src/main/target/common_pre.h b/src/main/target/common_pre.h index bbb90eba1b..4bcd6d95b5 100644 --- a/src/main/target/common_pre.h +++ b/src/main/target/common_pre.h @@ -194,7 +194,6 @@ #define USE_MSP_DISPLAYPORT #define USE_MSP_OVER_TELEMETRY #define USE_LED_STRIP -#define USE_RX_RSSI_DBM #endif #if ((FLASH_SIZE > 256) || (FEATURE_CUT_LEVEL < 11)) @@ -272,6 +271,7 @@ #define USE_ESC_SENSOR_INFO #define USE_CRSF_CMS_TELEMETRY #define USE_CRSF_LINK_STATISTICS +#define USE_RX_RSSI_DBM #endif #endif // FLASH_SIZE > 128 @@ -314,4 +314,3 @@ #define USE_PERSISTENT_STATS #define USE_PROFILE_NAMES #endif -