Closed lieux closed 5 years ago
This is expected: some drivers only return signal in percents (presumably this is rare), some in dbms.
Same on my machine.
I guess this needs to be stated in plugins/network-linux/README.rst
.
You can use NetworkManager's formula of calculating percent from dbm: 1 - 0.7 * (MAX_DBM - dbm) / (MAX_DBM - MIN_DBM)
, where dbm
is clamped between MIN_DBM
and MAX_DBM
, MIN_DBM = -90
, MAX_DBM = -20
. See examples/i3/wireless.lua
, make_wifi_gauge
function.
The parameter signal_dbm works fine but signal_percent returns nil.