Added additional SMART temperature attributes.
authormoel.mich
Wed, 17 Feb 2010 18:48:27 +0000
changeset 48eb04985b7b6a
parent 47 1d02fde1bb23
child 49 b418098ceca3
Added additional SMART temperature attributes.
Hardware/HDD/HDDGroup.cs
Hardware/HDD/SMART.cs
Properties/AssemblyInfo.cs
     1.1 --- a/Hardware/HDD/HDDGroup.cs	Tue Feb 16 21:44:25 2010 +0000
     1.2 +++ b/Hardware/HDD/HDDGroup.cs	Wed Feb 17 18:48:27 2010 +0000
     1.3 @@ -67,12 +67,24 @@
     1.4                  continue;
     1.5  
     1.6                int attribute = -1;
     1.7 -              for (int i = 0; i < attributes.Length; i++) {
     1.8 +              for (int i = 0; i < attributes.Length; i++) 
     1.9                  if (attributes[i].ID == SMART.AttributeID.Temperature) {
    1.10                    attribute = i;
    1.11                    break;
    1.12                  }
    1.13 -              }
    1.14 +              if (attribute == -1) 
    1.15 +                for (int i = 0; i < attributes.Length; i++)
    1.16 +                  if (attributes[i].ID == SMART.AttributeID.DriveTemperature) {
    1.17 +                    attribute = i;
    1.18 +                    break;
    1.19 +                  }
    1.20 +              if (attribute == -1)
    1.21 +                for (int i = 0; i < attributes.Length; i++)
    1.22 +                  if (attributes[i].ID == SMART.AttributeID.AirflowTemperature) 
    1.23 +                  {
    1.24 +                    attribute = i;
    1.25 +                    break;
    1.26 +                  }
    1.27  
    1.28                if (attribute >= 0) {
    1.29                  hardware.Add(new HDD(name, handle, drive, attribute));
     2.1 --- a/Hardware/HDD/SMART.cs	Tue Feb 16 21:44:25 2010 +0000
     2.2 +++ b/Hardware/HDD/SMART.cs	Wed Feb 17 18:48:27 2010 +0000
     2.3 @@ -67,13 +67,15 @@
     2.4        RecalibrationRetries = 0x0B,
     2.5        PowerCycleCount = 0x0C,
     2.6        SoftReadErrorRate = 0x0D,
     2.7 +      AirflowTemperature = 0xBE,
     2.8        Temperature = 0xC2,
     2.9        HardwareECCRecovered = 0xC3,
    2.10        ReallocationEventCount = 0xC4,
    2.11        CurrentPendingSectorCount = 0xC5,
    2.12        UncorrectableSectorCount = 0xC6,
    2.13        UltraDMACRCErrorCount = 0xC7,
    2.14 -      WriteErrorRate = 0xC8
    2.15 +      WriteErrorRate = 0xC8,
    2.16 +      DriveTemperature = 0xE7
    2.17      }
    2.18  
    2.19      [StructLayout(LayoutKind.Sequential, Pack = 1)]
     3.1 --- a/Properties/AssemblyInfo.cs	Tue Feb 16 21:44:25 2010 +0000
     3.2 +++ b/Properties/AssemblyInfo.cs	Wed Feb 17 18:48:27 2010 +0000
     3.3 @@ -69,5 +69,5 @@
     3.4  // You can specify all the values or you can default the Build and Revision Numbers 
     3.5  // by using the '*' as shown below:
     3.6  // [assembly: AssemblyVersion("1.0.*")]
     3.7 -[assembly: AssemblyVersion("0.1.21.1")]
     3.8 -[assembly: AssemblyFileVersion("0.1.21.1")]
     3.9 +[assembly: AssemblyVersion("0.1.21.2")]
    3.10 +[assembly: AssemblyFileVersion("0.1.21.2")]