Fixed Issue 20.
1.1 --- a/Hardware/LPC/F718XX.cs Sat Mar 27 12:57:09 2010 +0000
1.2 +++ b/Hardware/LPC/F718XX.cs Sat Mar 27 13:04:34 2010 +0000
1.3 @@ -130,8 +130,6 @@
1.4 sensor.Value = voltageGains[sensor.Index] * 0.001f * (value << 4);
1.5 if (sensor.Value > 0)
1.6 ActivateSensor(sensor);
1.7 - else
1.8 - DeactivateSensor(sensor);
1.9 }
1.10
1.11 foreach (Sensor sensor in temperatures) {
1.12 @@ -156,7 +154,7 @@
1.13 sensor.Value = value / 128.0f;
1.14 ActivateSensor(sensor);
1.15 } else {
1.16 - DeactivateSensor(sensor);
1.17 + sensor.Value = null;
1.18 }
1.19 } break;
1.20 default: {
1.21 @@ -165,8 +163,6 @@
1.22 sensor.Value = value + sensor.Parameters[0].Value;
1.23 if (value < sbyte.MaxValue && value > 0)
1.24 ActivateSensor(sensor);
1.25 - else
1.26 - DeactivateSensor(sensor);
1.27 } break;
1.28 }
1.29 }
1.30 @@ -180,7 +176,7 @@
1.31 if (sensor.Value > 0)
1.32 ActivateSensor(sensor);
1.33 } else {
1.34 - DeactivateSensor(sensor);
1.35 + sensor.Value = null;
1.36 }
1.37 }
1.38 }
2.1 --- a/Hardware/LPC/IT87XX.cs Sat Mar 27 12:57:09 2010 +0000
2.2 +++ b/Hardware/LPC/IT87XX.cs Sat Mar 27 13:04:34 2010 +0000
2.3 @@ -165,9 +165,7 @@
2.4
2.5 sensor.Value = voltageGains[sensor.Index] * 0.001f * (value << 4);
2.6 if (sensor.Value > 0)
2.7 - ActivateSensor(sensor);
2.8 - else
2.9 - DeactivateSensor(sensor);
2.10 + ActivateSensor(sensor);
2.11 }
2.12
2.13 foreach (Sensor sensor in temperatures) {
2.14 @@ -179,9 +177,7 @@
2.15
2.16 sensor.Value = value + sensor.Parameters[0].Value;
2.17 if (value < sbyte.MaxValue && value > 0)
2.18 - ActivateSensor(sensor);
2.19 - else
2.20 - DeactivateSensor(sensor);
2.21 + ActivateSensor(sensor);
2.22 }
2.23
2.24 foreach (Sensor sensor in fans) {
2.25 @@ -198,7 +194,7 @@
2.26 if (sensor.Value > 0)
2.27 ActivateSensor(sensor);
2.28 } else {
2.29 - DeactivateSensor(sensor);
2.30 + sensor.Value = null;
2.31 }
2.32 }
2.33 }
3.1 --- a/Hardware/LPC/W836XX.cs Sat Mar 27 12:57:09 2010 +0000
3.2 +++ b/Hardware/LPC/W836XX.cs Sat Mar 27 13:04:34 2010 +0000
3.3 @@ -215,8 +215,6 @@
3.4 }
3.5 if (sensor.Value > 0)
3.6 ActivateSensor(sensor);
3.7 - else
3.8 - DeactivateSensor(sensor);
3.9 } else {
3.10 // Battery voltage
3.11 bool valid = (ReadByte(0, 0x5D) & 0x01) > 0;
3.12 @@ -224,8 +222,9 @@
3.13 sensor.Value =
3.14 0.008f * voltageGains[sensor.Index] * ReadByte(5, 0x51);
3.15 ActivateSensor(sensor);
3.16 - } else
3.17 - DeactivateSensor(sensor);
3.18 + } else {
3.19 + sensor.Value = null;
3.20 + }
3.21 }
3.22 }
3.23
3.24 @@ -241,7 +240,7 @@
3.25 sensor.Value = temperature + sensor.Parameters[0].Value;
3.26 ActivateSensor(sensor);
3.27 } else {
3.28 - DeactivateSensor(sensor);
3.29 + sensor.Value = null;
3.30 }
3.31 }
3.32