Hardware/LPC/IT87XX.cs
changeset 63 1a7c13ac7348
parent 37 124f735b73aa
child 78 52c16b1d5536
     1.1 --- a/Hardware/LPC/IT87XX.cs	Tue Feb 23 19:45:40 2010 +0000
     1.2 +++ b/Hardware/LPC/IT87XX.cs	Sat Feb 27 15:55:17 2010 +0000
     1.3 @@ -90,8 +90,10 @@
     1.4  
     1.5        temperatures = new Sensor[3];
     1.6        for (int i = 0; i < temperatures.Length; i++) 
     1.7 -        temperatures[i] = new Sensor("Temperature #" + (i + 1), i,
     1.8 -          SensorType.Temperature, this);
     1.9 +        temperatures[i] = new Sensor("Temperature #" + (i + 1), i, null,
    1.10 +          SensorType.Temperature, this, new ParameterDescription[] {
    1.11 +            new ParameterDescription("Offset", "Temperature offset.", 0)
    1.12 +          });
    1.13  
    1.14        fans = new Sensor[5];
    1.15        for (int i = 0; i < fans.Length; i++)
    1.16 @@ -150,8 +152,9 @@
    1.17        }
    1.18  
    1.19        foreach (Sensor sensor in temperatures) {
    1.20 -        sbyte value = (sbyte)ReadByte((byte)(TEMPERATURE_BASE_REG + sensor.Index));
    1.21 -        sensor.Value = value;
    1.22 +        sbyte value = 
    1.23 +          (sbyte)ReadByte((byte)(TEMPERATURE_BASE_REG + sensor.Index));
    1.24 +        sensor.Value = value + sensor.Parameters[0].Value;
    1.25          if (value < sbyte.MaxValue && value > 0)
    1.26            ActivateSensor(sensor);
    1.27          else