forked from enlightenment/enlightenment
Patch to add PowerBook temperature reading from Paul T. Threshold.
SVN revision: 30770
This commit is contained in:
parent
830f8a0313
commit
9cb750dfe0
|
@ -231,6 +231,11 @@ _temperature_sensor_init(Config_Face *inst)
|
|||
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 @@ _temperature_sensor_init(Config_Face *inst)
|
|||
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 @@ _temperature_cb_check(void *data)
|
|||
goto error;
|
||||
break;
|
||||
case SENSOR_TYPE_LINUX_MACMINI:
|
||||
case SENSOR_TYPE_LINUX_PBOOK:
|
||||
f = fopen(inst->sensor_path, "rb");
|
||||
if (f)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,8 @@ typedef enum _Sensor_Type
|
|||
SENSOR_TYPE_OMNIBOOK,
|
||||
SENSOR_TYPE_LINUX_MACMINI,
|
||||
SENSOR_TYPE_LINUX_I2C,
|
||||
SENSOR_TYPE_LINUX_ACPI
|
||||
SENSOR_TYPE_LINUX_ACPI,
|
||||
SENSOR_TYPE_LINUX_PBOOK
|
||||
} Sensor_Type;
|
||||
|
||||
struct _Config_Face
|
||||
|
|
Loading…
Reference in New Issue