diff -r 3b8443edb0e6 -r ea86cea126bc Hardware/HDD/AbstractHarddrive.cs --- a/Hardware/HDD/AbstractHarddrive.cs Wed Jul 25 15:33:16 2012 +0000 +++ b/Hardware/HDD/AbstractHarddrive.cs Wed Jul 25 16:03:36 2012 +0000 @@ -169,7 +169,8 @@ if (!sensorTypeAndChannels.Contains(pair)) { Sensor sensor = new Sensor(attribute.Name, attribute.SensorChannel, attribute.DefaultHiddenSensor, - attribute.SensorType.Value, this, null, settings); + attribute.SensorType.Value, this, attribute.ParameterDescriptions, + settings); sensors.Add(attribute, sensor); ActivateSensor(sensor); @@ -199,7 +200,7 @@ foreach (DriveAttributeValue value in values) { if (value.Identifier == attribute.Identifier) { Sensor sensor = keyValuePair.Value; - sensor.Value = attribute.ConvertValue(value); + sensor.Value = attribute.ConvertValue(value, sensor.Parameters); } } } @@ -261,7 +262,7 @@ if (a.Identifier == value.Identifier) { description = a.Name; if (a.HasRawValueConversion | a.SensorType.HasValue) - physical = a.ConvertValue(value); + physical = a.ConvertValue(value, null); else physical = null; } @@ -295,7 +296,9 @@ return r.ToString(); } - protected static float RawToInt(byte[] raw, byte value) { + protected static float RawToInt(byte[] raw, byte value, + IReadOnlyArray parameters) + { return (raw[3] << 24) | (raw[2] << 16) | (raw[1] << 8) | raw[0]; }