Added support for Intel CPU power sensors (package and cores).

This commit is contained in:
Michael Möller
2011-07-27 18:27:16 +00:00
parent e3adf6ceb6
commit 70c338cc63
8 changed files with 94 additions and 7 deletions
+2 -1
View File
@@ -65,7 +65,8 @@ namespace OpenHardwareMonitor.GUI {
typeNodes.Add(new TypeNode(SensorType.Flow));
typeNodes.Add(new TypeNode(SensorType.Control));
typeNodes.Add(new TypeNode(SensorType.Level));
typeNodes.Add(new TypeNode(SensorType.Power));
foreach (ISensor sensor in hardware.Sensors)
SensorAdded(sensor);
+2 -1
View File
@@ -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-2010
Portions created by the Initial Developer are Copyright (C) 2009-2011
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -75,6 +75,7 @@ namespace OpenHardwareMonitor.GUI {
case SensorType.Flow: format = "{0:F0} L/h"; break;
case SensorType.Control: format = "{0:F1} %"; break;
case SensorType.Level: format = "{0:F1} %"; break;
case SensorType.Power: format = "{0:F1} W"; break;
}
bool hidden = settings.GetValue(new Identifier(sensor.Identifier,
+4 -1
View File
@@ -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-2010
Portions created by the Initial Developer are Copyright (C) 2009-2011
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -196,6 +196,8 @@ namespace OpenHardwareMonitor.GUI {
return string.Format("{0:F0}", sensor.Value);
case SensorType.Level:
return string.Format("{0:F0}", sensor.Value);
case SensorType.Power:
return string.Format("{0:F0}", sensor.Value);
}
return "-";
}
@@ -283,6 +285,7 @@ namespace OpenHardwareMonitor.GUI {
case SensorType.Flow: format = "\n{0}: {1:F0} L/h"; break;
case SensorType.Control: format = "\n{0}: {1:F1} %"; break;
case SensorType.Level: format = "\n{0}: {1:F1} %"; break;
case SensorType.Power: format = "\n{0}: {1:F0} W"; break;
}
string formattedValue = string.Format(format, sensor.Name, sensor.Value);
string hardwareName = sensor.Hardware.Name;
+5 -1
View File
@@ -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-2010
Portions created by the Initial Developer are Copyright (C) 2009-2011
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -80,6 +80,10 @@ namespace OpenHardwareMonitor.GUI {
this.Image = Utilities.EmbeddedResources.GetImage("level.png");
this.Text = "Levels";
break;
case SensorType.Power:
this.Image = Utilities.EmbeddedResources.GetImage("power.png");
this.Text = "Powers";
break;
}
NodeAdded += new NodeEventHandler(TypeNode_NodeAdded);