Enlightenment CVS committal

Author  : onefang
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/modules/temperature


Modified Files:
        e_mod_config.c e_mod_main.c 


Log Message:
Increase the number of i2c sensors to 4.  The only useful one on my 
motherboard (ASUS A7V333) is the fourth one.  Others may find this handy as 
well.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/temperature/e_mod_config.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- e_mod_config.c      17 Dec 2006 22:01:45 -0000      1.27
+++ e_mod_config.c      26 Jan 2007 10:00:03 -0000      1.28
@@ -127,6 +127,7 @@
         ecore_list_append(cfdata->sensors, strdup("temp1"));
         ecore_list_append(cfdata->sensors, strdup("temp2"));
         ecore_list_append(cfdata->sensors, strdup("temp3"));
+        ecore_list_append(cfdata->sensors, strdup("temp4"));
         ecore_list_goto_first(cfdata->sensors);
         while ((name = ecore_list_next(cfdata->sensors)))
           {
===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/temperature/e_mod_main.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -3 -r1.77 -r1.78
--- e_mod_main.c        30 Dec 2006 23:32:25 -0000      1.77
+++ e_mod_main.c        26 Jan 2007 10:00:03 -0000      1.78
@@ -238,7 +238,7 @@
               }
             else
               {
-                 /* TODO: Is there I2C devices with more than 3 temperature 
sensors? */
+                 /* TODO: Is there I2C devices with more than 3 temperature 
sensors?  Yes, mine has 4. */
                  /* TODO: What to do when there is more than one tempX? */
                  therms = ecore_file_ls("/sys/bus/i2c/devices");
                  if (therms)
@@ -247,10 +247,10 @@
 
                       while ((name = ecore_list_next(therms)))
                         {
-                           char *sensors[] = { "temp1", "temp2", "temp3" };
+                           char *sensors[] = { "temp1", "temp2", "temp3", 
"temp4" };
                            int i;
 
-                           for (i = 0; i < 3; i++)
+                           for (i = 0; i < 4; i++)
                              {
                                 sprintf(path, 
"/sys/bus/i2c/devices/%s/%s_input",
                                       name, sensors[i]);
@@ -447,7 +447,7 @@
        if (inst->units == FAHRENHEIT) 
          snprintf(buf, sizeof(buf), "%i°F", temp);
        else
-         snprintf(buf, sizeof(buf), "%i°C", temp);               
+         snprintf(buf, sizeof(buf), "%i°C", temp);  
        utf8 = ecore_txt_convert("iso-8859-1", "utf-8", buf);
 
         _temperature_face_level_set(inst,



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to