nice work devilhorns :)
On 3/12/06, [email protected] <
[email protected]> wrote:
Enlightenment CVS committal
Author : devilhorns
Project : e_modules
Module : wlan
Dir : e_modules/wlan
Modified Files:
e_mod_main.c
Log Message:
Fix values on wlan module.
Will just display the 'link' value from /proc/net/wireless now as monitor
module did.
===================================================================
RCS file: /cvsroot/enlightenment/e_modules/wlan/e_mod_main.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 - r1.16 -r1.17
--- e_mod_main.c 12 Mar 2006 19:06:06 -0000 1.16
+++ e_mod_main.c 12 Mar 2006 20:30:16 -0000 1.17
@@ -182,8 +182,8 @@
if (!fl)
{
nf->conf = E_NEW(Config_Face, 1);
- nf->conf->enabled = 1;
- nf->conf->device = (char *)evas_stringshare_add("wlan0");
+ nf->conf->enabled = 1; //wlan0
+ nf->conf->device = (char *)evas_stringshare_add("eth0");
nf->conf->check_interval = 30;
nf->conf->show_text = 1;
nf->conf->show_graph = 1;
@@ -480,12 +480,10 @@
int wlan_link = 0;
int wlan_level = 0;
int wlan_noise = 0;
- int wlan_value = 0;
char in_str[100];
nf = data;
-
stat = fopen("/proc/net/wireless", "r");
if (!stat)
return 1;
@@ -514,22 +512,18 @@
if (!found_dev)
return 1;
-
- wlan_value = -(100 - wlan_level - wlan_noise);
- if (wlan_level == 0)
- wlan_value = 0;
/* Update the modules text */
if (nf->conf->show_text)
{
- snprintf(in_str, sizeof(in_str), "LNK: %d%%", wlan_value);
+ snprintf(in_str, sizeof(in_str), "LNK: %d%%", wlan_link);
edje_object_part_text_set(nf->txt_obj, "link-text", in_str);
}
else
edje_object_part_text_set(nf->txt_obj, "link-text", "");
-
+
if (nf->conf->show_graph)
- _wlan_face_graph_values(nf, wlan_value);
+ _wlan_face_graph_values(nf, wlan_link);
else
_wlan_face_graph_clear(nf);
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
