modem-helpers: setup common RSSI to signal quality converter

This commit is contained in:
Aleksander Morgado
2021-10-18 00:04:09 +02:00
parent e1bc4b0999
commit c01f22804e
4 changed files with 14 additions and 16 deletions
+2 -4
View File
@@ -767,10 +767,8 @@ get_one_quality (const gchar *reply,
}
}
if (success) {
dbm = CLAMP (dbm, -113, -51);
quality = 100 - ((dbm + 51) * 100 / (-113 + 51));
}
if (success)
quality = MM_RSSI_TO_QUALITY (dbm);
g_free (temp);
return quality;