[Goodies-commits] r5959 - xfce4-sensors-plugin/trunk/lib

Fabian Nowak timystery at xfce.org
Tue Nov 4 02:17:20 CET 2008


Author: timystery
Date: 2008-11-04 01:17:20 +0000 (Tue, 04 Nov 2008)
New Revision: 5959

Modified:
   xfce4-sensors-plugin/trunk/lib/acpi.c
Log:
and repaired the units - given in sysfs as uMh instead of mWh


Modified: xfce4-sensors-plugin/trunk/lib/acpi.c
===================================================================
--- xfce4-sensors-plugin/trunk/lib/acpi.c	2008-11-04 01:12:06 UTC (rev 5958)
+++ xfce4-sensors-plugin/trunk/lib/acpi.c	2008-11-04 01:17:20 UTC (rev 5959)
@@ -223,7 +223,7 @@
         if (fgets (buf, 1024, file)!=NULL)
         {
             cut_newline (buf);
-            value = strtod (buf, NULL);
+            value = strtod (buf, NULL) / 1000.0;
         }
 #else
         while (fgets (buf, 1024, file)!=NULL)
@@ -331,7 +331,7 @@
                     if (fgets (buf, 1024, file)!=NULL)
                     {
                         cut_newline (buf);
-                        chipfeature->min_value = strtod (buf, NULL);
+                        chipfeature->min_value = strtod (buf, NULL) / 1000.0;
                         DBG ("Min-Value=%f\n", chipfeature->min_value);
                     }
 #else
@@ -412,7 +412,7 @@
         if (fgets (buf, 1024, file)!=NULL)
         {
             cut_newline (buf);
-            chipfeature->max_value = strtod (buf, NULL);
+            chipfeature->max_value = strtod (buf, NULL) / 1000.0;
             DBG ("Max-Value=%f\n", chipfeature->max_value);
         }
 #else




More information about the Goodies-commits mailing list