mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-10-19 15:06:01 +00:00
Added a new sensor type "Factor" for dimensionless values (and similar) that are not to be shown as percent ("Level" type). Changed the write amplification sensor to use the new "Factor" sensor type. Added the temperature SMART attribute for Sandforce SSDs as hidden sensor (as it may show fake results on some hardware).
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Michael Möller <m.moeller@gmx.ch>.
|
||||
Portions created by the Initial Developer are Copyright (C) 2009-2011
|
||||
Portions created by the Initial Developer are Copyright (C) 2009-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -181,17 +181,17 @@ namespace OpenHardwareMonitor.GUI {
|
||||
|
||||
switch (sensor.SensorType) {
|
||||
case SensorType.Voltage:
|
||||
return string.Format("{0:F11}", sensor.Value);
|
||||
return string.Format("{0:F1}", sensor.Value);
|
||||
case SensorType.Clock:
|
||||
return string.Format("{0:F11}", 1e-3f * sensor.Value);
|
||||
return string.Format("{0:F1}", 1e-3f * sensor.Value);
|
||||
case SensorType.Load:
|
||||
return string.Format("{0:F0}", sensor.Value);
|
||||
case SensorType.Temperature:
|
||||
return string.Format("{0:F0}", sensor.Value);
|
||||
case SensorType.Fan:
|
||||
return string.Format("{0:F11}", 1e-3f * sensor.Value);
|
||||
return string.Format("{0:F1}", 1e-3f * sensor.Value);
|
||||
case SensorType.Flow:
|
||||
return string.Format("{0:F11}", 1e-3f * sensor.Value);
|
||||
return string.Format("{0:F1}", 1e-3f * sensor.Value);
|
||||
case SensorType.Control:
|
||||
return string.Format("{0:F0}", sensor.Value);
|
||||
case SensorType.Level:
|
||||
@@ -200,6 +200,8 @@ namespace OpenHardwareMonitor.GUI {
|
||||
return string.Format("{0:F0}", sensor.Value);
|
||||
case SensorType.Data:
|
||||
return string.Format("{0:F0}", sensor.Value);
|
||||
case SensorType.Factor:
|
||||
return string.Format("{0:F1}", sensor.Value);
|
||||
}
|
||||
return "-";
|
||||
}
|
||||
@@ -289,6 +291,7 @@ namespace OpenHardwareMonitor.GUI {
|
||||
case SensorType.Level: format = "\n{0}: {1:F1} %"; break;
|
||||
case SensorType.Power: format = "\n{0}: {1:F0} W"; break;
|
||||
case SensorType.Data: format = "\n{0}: {1:F0} GB"; break;
|
||||
case SensorType.Factor: format = "\n{0}: {1:F3} GB"; break;
|
||||
}
|
||||
string formattedValue = string.Format(format, sensor.Name, sensor.Value);
|
||||
string hardwareName = sensor.Hardware.Name;
|
||||
|
Reference in New Issue
Block a user