mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-08-30 13:57:38 +00:00
Fixed a division by zero in the Sandforce write amplification sensor.
This commit is contained in:
parent
71f477d9e6
commit
a3dea40fd6
@ -92,8 +92,11 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
hostWritesToController = RawToInt(value.RawValue, value.AttrValue);
|
||||
}
|
||||
if (controllerWritesToNAND.HasValue && hostWritesToController.HasValue) {
|
||||
writeAmplification.Value =
|
||||
controllerWritesToNAND.Value / hostWritesToController.Value;
|
||||
if (hostWritesToController.Value > 0)
|
||||
writeAmplification.Value =
|
||||
controllerWritesToNAND.Value / hostWritesToController.Value;
|
||||
else
|
||||
writeAmplification.Value = 0;
|
||||
ActivateSensor(writeAmplification);
|
||||
}
|
||||
}
|
||||
|
@ -37,5 +37,5 @@
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("0.4.0.3")]
|
||||
[assembly: AssemblyInformationalVersion("0.4.0.3 Alpha")]
|
||||
[assembly: AssemblyVersion("0.4.0.4")]
|
||||
[assembly: AssemblyInformationalVersion("0.4.0.4 Alpha")]
|
Loading…
x
Reference in New Issue
Block a user