Fixed the Samsung SSD Total Bytes Written sensor to use 48-bit raw data (instead of 32-bit) and corrected the label to "Total Bytes Written" instead of "Total LBA Written".

This commit is contained in:
Michael Möller
2016-11-09 20:16:11 +01:00
parent 556891a8c9
commit 336a4b5a0c
4 changed files with 16 additions and 18 deletions

View File

@@ -317,19 +317,19 @@ namespace OpenHardwareMonitor.Hardware.HDD {
new Drive("Samsung SSD 840 PRO Series", "DXM05B0Q", 16,
@"05 000000000000 100 100 10
09 260000000000 99 99 0
0C 170000000000 99 99 0
B1 010000000000 99 99 0
09 541200000000 99 99 0
0C 820500000000 98 98 0
B1 B90200000000 80 80 0
B3 000000000000 100 100 10
B5 000000000000 100 100 10
B6 000000000000 100 100 10
B7 000000000000 100 100 10
BB 000000000000 100 100 0
BE 190000000000 60 75 0
BE 1C0000000000 48 72 0
C3 000000000000 200 200 0
C7 000000000000 100 100 0
EB 030000000000 99 99 0
F1 8FF425100000 99 99 0")};
C7 020000000000 99 99 0
EB 690000000000 99 99 0
F1 A56AA1F60200 99 99 0")};
public IntPtr OpenDrive(int driveNumber) {
if (driveNumber < drives.Length)

View File

@@ -50,10 +50,12 @@ namespace OpenHardwareMonitor.Hardware.HDD {
new SmartAttribute(0xC9, SmartNames.SupercapStatus),
new SmartAttribute(0xCA, SmartNames.ExceptionModeStatus),
new SmartAttribute(0xEB, SmartNames.PowerRecoveryCount),
new SmartAttribute(0xF1, SmartNames.TotalLBAWritten,
(byte[] r, byte v, IReadOnlyArray<IParameter> p)
=> { return RawToInt(r, v, p) * 512 / 1024 / 1024 / 1024; },
SensorType.Data, 0, SmartNames.TotalLBAWritten)
new SmartAttribute(0xF1, SmartNames.TotalLbasWritten,
(byte[] r, byte v, IReadOnlyArray<IParameter> p) => {
return (((long)r[5] << 40) | ((long)r[4] << 32) | ((long)r[3] << 24) |
((long)r[2] << 16) | ((long)r[1] << 8) | r[0]) *
(512.0f / 1024 / 1024 / 1024);
}, SensorType.Data, 0, "Total Bytes Written")
};
public SSDSamsung(ISmart smart, string name, string firmwareRevision,

View File

@@ -494,9 +494,5 @@ namespace OpenHardwareMonitor.Hardware.HDD {
public static string PowerRecoveryCount {
get { return "Power Recovery Count"; }
}
public static string TotalLBAWritten {
get { return "Total LBA Written"; }
}
}
}

View File

@@ -10,5 +10,5 @@
using System.Reflection;
[assembly: AssemblyVersion("0.8.0.0")]
[assembly: AssemblyInformationalVersion("0.8.0 Beta")]
[assembly: AssemblyVersion("0.8.0.1")]
[assembly: AssemblyInformationalVersion("0.8.0.1 Alpha")]