diff --git a/src/Tuner_Drv_Lithio.cpp b/src/Tuner_Drv_Lithio.cpp index c655a01..bf2a3c8 100644 --- a/src/Tuner_Drv_Lithio.cpp +++ b/src/Tuner_Drv_Lithio.cpp @@ -234,7 +234,7 @@ bool devTEF_Radio_Get_Quality_Status_AM (int16_t *level, uint16_t *noise, uint16 *mod = Convert8bto16b(buf + 12) / 10; if (*level < -200) *level = -200; if (*level > 1200) *level = 1200; - if (-((int8_t)(*noise / 10)) > *level) *snr = 0; else *snr = -((int8_t)(*noise / 10)) / 10; + *snr = int(0.46222375 * (float)(*level) / 10 - 0.082495118 * (float)(*noise/50) / 10) + 10; return r; }