Hardware/HDD/SSDMicron.cs
changeset 374 ea86cea126bc
parent 358 7962499f9cd6
     1.1 --- a/Hardware/HDD/SSDMicron.cs	Wed Jul 25 15:33:16 2012 +0000
     1.2 +++ b/Hardware/HDD/SSDMicron.cs	Wed Jul 25 16:03:36 2012 +0000
     1.3 @@ -8,8 +8,10 @@
     1.4  	
     1.5  */
     1.6  
     1.7 -namespace OpenHardwareMonitor.Hardware.HDD {
     1.8 -  using System.Collections.Generic;
     1.9 +using System.Collections.Generic;
    1.10 +using OpenHardwareMonitor.Collections;
    1.11 +
    1.12 +namespace OpenHardwareMonitor.Hardware.HDD {  
    1.13  
    1.14    [NamePrefix(""), RequireSmart(0xAA), RequireSmart(0xAB), RequireSmart(0xAC), 
    1.15     RequireSmart(0xAD), RequireSmart(0xAE), RequireSmart(0xCA)]
    1.16 @@ -28,7 +30,8 @@
    1.17        new SmartAttribute(0xAD, SmartNames.WearLevelingCount, RawToInt),
    1.18        new SmartAttribute(0xAE, SmartNames.UnexpectedPowerLossCount, RawToInt),
    1.19        new SmartAttribute(0xB5, SmartNames.Non4kAlignedAccess, 
    1.20 -        (byte[] raw, byte value) => { return 6e4f * ((raw[5] << 8) | raw[4]); }),
    1.21 +        (byte[] raw, byte value, IReadOnlyArray<IParameter> p) 
    1.22 +          => { return 6e4f * ((raw[5] << 8) | raw[4]); }),
    1.23        new SmartAttribute(0xB7, SmartNames.SataDownshiftErrorCount, RawToInt),
    1.24        new SmartAttribute(0xBB, SmartNames.ReportedUncorrectableErrors, RawToInt),
    1.25        new SmartAttribute(0xBC, SmartNames.CommandTimeout, RawToInt),
    1.26 @@ -38,10 +41,12 @@
    1.27        new SmartAttribute(0xC6, SmartNames.OffLineUncorrectableErrorCount, RawToInt),
    1.28        new SmartAttribute(0xC7, SmartNames.UltraDmaCrcErrorCount, RawToInt),
    1.29        new SmartAttribute(0xCA, SmartNames.RemainingLife, 
    1.30 -        (byte[] raw, byte value) => { return 100 - RawToInt(raw, value); }, 
    1.31 +        (byte[] raw, byte value, IReadOnlyArray<IParameter> p) 
    1.32 +          => { return 100 - RawToInt(raw, value, p); }, 
    1.33          SensorType.Level, 0),
    1.34        new SmartAttribute(0xCE, SmartNames.WriteErrorRate, 
    1.35 -         (byte[] raw, byte value) => { return 6e4f * ((raw[1] << 8) | raw[0]); }),
    1.36 +         (byte[] raw, byte value, IReadOnlyArray<IParameter> p)
    1.37 +           => { return 6e4f * ((raw[1] << 8) | raw[0]); }),
    1.38      };
    1.39  
    1.40      public SSDMicron(ISmart smart, string name, string firmwareRevision,