[Xfce4-commits] [panel-plugins/xfce4-wavelan-plugin] 02/02: Fix signal quality
noreply at xfce.org
noreply at xfce.org
Thu Nov 16 13:40:17 CET 2017
This is an automated email from the git hooks/post-receive script.
s k u n n y k p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-wavelan-plugin.
commit 4736d7b4613725bae9db8a21030933cf76d075fc
Author: Romain B <skunnyk at alteroot.org>
Date: Thu Nov 16 13:36:48 2017 +0100
Fix signal quality
- Patch from https://svnweb.freebsd.org/ports/head/sysutils/xfce4-wavelan-plugin/files/patch-panel-plugin__wavelan.c?revision=354754&view=markupi
---
panel-plugin/wavelan.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/panel-plugin/wavelan.c b/panel-plugin/wavelan.c
index d917284..5939d48 100644
--- a/panel-plugin/wavelan.c
+++ b/panel-plugin/wavelan.c
@@ -194,7 +194,15 @@ wavelan_timer(gpointer data)
}
}
else {
- wavelan_set_state(wavelan, stats.ws_quality);
+ /*
+ * Usual formula is: qual = 4 * (signal - noise)
+ * where noise is typically about -96dBm, but we don't have
+ * the actual noise value here, so approximate one.
+ */
+ if (strcmp(stats.ws_qunit, "dBm") == 0)
+ wavelan_set_state(wavelan, 4 * (stats.ws_quality - (-96)));
+ else
+ wavelan_set_state(wavelan, stats.ws_quality);
if (strlen(stats.ws_netname) > 0)
/* Translators: net_name: quality quality_unit at rate Mb/s*/
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list