From 3c0068137266e5e19abf7915b626e6b95fbc5006 Mon Sep 17 00:00:00 2001 From: octo Date: Fri, 14 Apr 2006 17:00:44 +0000 Subject: [PATCH] Added some more `IOHWSensor' types.. --- TODO | 1 - src/apple_sensors.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index b8a5b33a..9cec87b6 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,3 @@ -src/apple_sensors.c: Check for more sensor types. src/battery.c: commend not working code. general: build Darwin package 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", -- 2.30.2