i made this little patch to enable temperature reading on my powerbook...
here the thermostat module is therm_adt746x and uses files in
/sys/devices/temperatures, just as the macmini, but here the temp is
located into sensor1_temperature file.
powerbook 15'' - PMU version 12
diff -urN temperature/e_mod_main.c temperature_ptt/e_mod_main.c
--- temperature/e_mod_main.c 2007-06-01 15:59:27.000000000 +0200
+++ temperature_ptt/e_mod_main.c 2007-06-12 18:24:03.000000000 +0200
@@ -231,6 +231,11 @@
inst->sensor_type = SENSOR_TYPE_OMNIBOOK;
inst->sensor_name = evas_stringshare_add("dummy");
}
+ else if (ecore_file_exists("/sys/devices/temperatures/sensor1_temperature"))
+ {
+ inst->sensor_type = SENSOR_TYPE_LINUX_PBOOK;
+ inst->sensor_name = evas_stringshare_add("dummy");
+ }
else if (ecore_file_exists("/sys/devices/temperatures/cpu_temperature"))
{
inst->sensor_type = SENSOR_TYPE_LINUX_MACMINI;
@@ -288,6 +293,9 @@
case SENSOR_TYPE_LINUX_MACMINI:
inst->sensor_path = evas_stringshare_add("/sys/devices/temperatures/cpu_temperature");
break;
+ case SENSOR_TYPE_LINUX_PBOOK:
+ inst->sensor_path = evas_stringshare_add("/sys/devices/temperatures/sensor1_temperature");
+ break;
case SENSOR_TYPE_LINUX_I2C:
therms = ecore_file_ls("/sys/bus/i2c/devices");
if (therms)
@@ -369,6 +377,7 @@
goto error;
break;
case SENSOR_TYPE_LINUX_MACMINI:
+ case SENSOR_TYPE_LINUX_PBOOK:
f = fopen(inst->sensor_path, "rb");
if (f)
{
diff -urN temperature/e_mod_main.h temperature_ptt/e_mod_main.h
--- temperature/e_mod_main.h 2007-02-16 17:31:37.000000000 +0100
+++ temperature_ptt/e_mod_main.h 2007-06-12 18:24:48.000000000 +0200
@@ -19,6 +19,7 @@
SENSOR_TYPE_FREEBSD,
SENSOR_TYPE_OMNIBOOK,
SENSOR_TYPE_LINUX_MACMINI,
+ SENSOR_TYPE_LINUX_PBOOK,
SENSOR_TYPE_LINUX_I2C,
SENSOR_TYPE_LINUX_ACPI
} Sensor_Type;
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel