mirror of
https://github.com/egzumer/uv-k5-firmware-custom
synced 2024-11-22 01:32:43 +00:00
Fix s-meter over S9 values calculation
This commit is contained in:
parent
f074114d13
commit
03a51525b6
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user