1.1 --- a/Hardware/HDD/HDD.cs Sun Oct 17 19:13:26 2010 +0000
1.2 +++ b/Hardware/HDD/HDD.cs Sun Oct 17 19:25:50 2010 +0000
1.3 @@ -119,30 +119,29 @@
1.4
1.5 public void Update() {
1.6 if (count == 0) {
1.7 - List<SMART.DriveAttribute> attributes = SMART.ReadSmart(handle, drive);
1.8 + SMART.DriveAttribute[] attributes = SMART.ReadSmart(handle, drive);
1.9 +
1.10 if (temperatureID != SMART.AttributeID.None &&
1.11 - attributes.Exists(attr => attr.ID == temperatureID))
1.12 + Array.Exists(attributes, attr => attr.ID == temperatureID))
1.13 {
1.14 - temperatureSensor.Value = attributes
1.15 - .Find(attr => attr.ID == temperatureID)
1.16 + temperatureSensor.Value = Array
1.17 + .Find(attributes, attr => attr.ID == temperatureID)
1.18 .RawValue[0];
1.19 }
1.20
1.21 if (lifeID != SMART.AttributeID.None &&
1.22 - attributes.Exists(attr => attr.ID == lifeID))
1.23 + Array.Exists(attributes, attr => attr.ID == lifeID))
1.24 {
1.25 - lifeSensor.Value = attributes
1.26 - .Find(attr => attr.ID == lifeID)
1.27 + lifeSensor.Value = Array
1.28 + .Find(attributes, attr => attr.ID == lifeID)
1.29 .AttrValue;
1.30 }
1.31 } else {
1.32 - if (temperatureID != SMART.AttributeID.None) {
1.33 + if (temperatureID != SMART.AttributeID.None)
1.34 temperatureSensor.Value = temperatureSensor.Value;
1.35 - }
1.36
1.37 - if (lifeID != SMART.AttributeID.None) {
1.38 + if (lifeID != SMART.AttributeID.None)
1.39 lifeSensor.Value = lifeSensor.Value;
1.40 - }
1.41 }
1.42
1.43 count++; count %= UPDATE_DIVIDER;