X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fapple_sensors.c;h=37bd5c3965284f9e32ce39dc3cedda131d3f60c4;hb=4c3b690f915df7b56170cee189096949adedefe5;hp=24e8f977cdd8454c81fc704185fb35400746ec1a;hpb=3ffd4b45a043c96b5cafbbfa8842056ed3b865c7;p=collectd.git diff --git a/src/apple_sensors.c b/src/apple_sensors.c index 24e8f977..37bd5c39 100644 --- a/src/apple_sensors.c +++ b/src/apple_sensors.c @@ -224,11 +224,17 @@ static void as_read (void) &value_int)) continue; + /* Found e.g. in the 1.5GHz PowerBooks */ if (strcmp (type, "temperature") == 0) { value_double = ((double) value_int) / 65536.0; strncpy (type, "apple_temperature", 128); } + else if (strcmp (type, "temp") == 0) + { + value_double = ((double) value_int) / 10.0; + strncpy (type, "apple_temperature", 128); + } else if (strcmp (type, "fanspeed") == 0) { value_double = ((double) value_int) / 65536.0; @@ -239,6 +245,11 @@ static void as_read (void) /* Leave this to the battery plugin. */ continue; } + else if (strcmp (type, "adc") == 0) + { + value_double = ((double) value_int) / 10.0; + strncpy (type, "apple_temperature", 128); + } else { DBG ("apple_sensors: Read unknown sensor type: %s",