Fix s-meter over S9 values calculation

This commit is contained in:
Krzysiek Egzmont 2023-11-01 23:37:31 +01:00
parent f074114d13
commit 03a51525b6

View File

@ -156,7 +156,7 @@ static void DisplayRSSIBar(const int16_t rssi, const bool now)
const int16_t rssi_dBm = (rssi / 2) - 160;
const uint8_t s_level = MIN(MAX((rssi_dBm - s0_dBm) / 6, 0), 9); // S0 - S9
uint8_t overS9dBm = MIN(MAX(73 + rssi_dBm, 0), 99);
uint8_t overS9dBm = MIN(MAX(rssi_dBm - (s0_dBm + 9*6), 0), 99);
uint8_t overS9Bars = MIN(overS9dBm/10, 4);
if(overS9Bars == 0) {