diff --git a/.gitignore b/.gitignore
index 680f7ae06..7200491ba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
*.user
*.suo
-/Bin
-/Obj
\ No newline at end of file
+Bin/
+Obj/
+.vs/
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000..6e225872b
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,2 @@
+language: csharp
+solution: OpenHardwareMonitor.sln
diff --git a/External/Aga.Controls.dll b/External/Aga.Controls.dll
deleted file mode 100644
index 82de1bbf6..000000000
Binary files a/External/Aga.Controls.dll and /dev/null differ
diff --git a/External/Aga.Controls/Properties/Resources.resx b/External/Aga.Controls/Properties/Resources.resx
index 5307ac87d..09ea802ba 100644
--- a/External/Aga.Controls/Properties/Resources.resx
+++ b/External/Aga.Controls/Properties/Resources.resx
@@ -122,7 +122,7 @@
..\Resources\check.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
- ..\resources\dvsplit.cur;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ ..\Resources\DVSplit.cur;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
..\Resources\Folder.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
@@ -131,7 +131,7 @@
..\Resources\FolderClosed.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
- ..\resources\leaf.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+ ..\Resources\Leaf.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\loading_icon;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
@@ -146,6 +146,6 @@
..\Resources\uncheck.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
- ..\resources\unknown.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+ ..\Resources\unknown.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
\ No newline at end of file
diff --git a/External/Aga.Controls/Tree/NodeControls/NodeCheckBox.cs b/External/Aga.Controls/Tree/NodeControls/NodeCheckBox.cs
index 311cf5dd2..f702ef0e8 100644
--- a/External/Aga.Controls/Tree/NodeControls/NodeCheckBox.cs
+++ b/External/Aga.Controls/Tree/NodeControls/NodeCheckBox.cs
@@ -46,7 +46,9 @@ public NodeCheckBox(string propertyName)
public override Size MeasureSize(TreeNodeAdv node, DrawContext context)
{
- return new Size(ImageSize, ImageSize);
+ int scaledX = node.Tree.GetScaledSize(ImageSize, false);
+ int scaledY = node.Tree.GetScaledSize(ImageSize);
+ return new Size(scaledX, scaledY);
}
public override void Draw(TreeNodeAdv node, DrawContext context)
@@ -56,13 +58,15 @@ public override void Draw(TreeNodeAdv node, DrawContext context)
if (Application.RenderWithVisualStyles)
{
VisualStyleRenderer renderer;
+ int scaledX = node.Tree.GetScaledSize(ImageSize, false);
+ int scaledY = node.Tree.GetScaledSize(ImageSize);
if (state == CheckState.Indeterminate)
renderer = new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.MixedNormal);
else if (state == CheckState.Checked)
renderer = new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.CheckedNormal);
else
renderer = new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.UncheckedNormal);
- renderer.DrawBackground(context.Graphics, new Rectangle(bounds.X, bounds.Y, ImageSize, ImageSize));
+ renderer.DrawBackground(context.Graphics, new Rectangle(bounds.X, bounds.Y, scaledX, scaledY));
}
else
{
diff --git a/External/Aga.Controls/Tree/NodeControls/NodeIcon.cs b/External/Aga.Controls/Tree/NodeControls/NodeIcon.cs
index dfa1d6ae5..65ce972b3 100644
--- a/External/Aga.Controls/Tree/NodeControls/NodeIcon.cs
+++ b/External/Aga.Controls/Tree/NodeControls/NodeIcon.cs
@@ -19,9 +19,15 @@ public override Size MeasureSize(TreeNodeAdv node, DrawContext context)
{
Image image = GetIcon(node);
if (image != null)
- return image.Size;
+ {
+ int scaledX = node.Tree.GetScaledSize(image.Size.Width, false);
+ int scaledY = node.Tree.GetScaledSize(image.Size.Height);
+ return new Size(scaledX, scaledY); ;
+ }
else
+ {
return Size.Empty;
+ }
}
diff --git a/External/Aga.Controls/Tree/NodeControls/NodePlusMinus.cs b/External/Aga.Controls/Tree/NodeControls/NodePlusMinus.cs
index 0508c2bfe..3f16a5dae 100644
--- a/External/Aga.Controls/Tree/NodeControls/NodePlusMinus.cs
+++ b/External/Aga.Controls/Tree/NodeControls/NodePlusMinus.cs
@@ -46,7 +46,9 @@ public NodePlusMinus()
public override Size MeasureSize(TreeNodeAdv node, DrawContext context)
{
- return new Size(Width, Width);
+ int scaledX = node.Tree.GetScaledSize(Width, false);
+ int scaledY = node.Tree.GetScaledSize(Width);
+ return new Size(scaledX, scaledY);
}
public override void Draw(TreeNodeAdv node, DrawContext context)
@@ -54,7 +56,9 @@ public override void Draw(TreeNodeAdv node, DrawContext context)
if (node.CanExpand)
{
Rectangle r = context.Bounds;
- int dy = (int)Math.Round((float)(r.Height - ImageSize) / 2);
+ int scaledX = node.Tree.GetScaledSize(ImageSize, false);
+ int scaledY = node.Tree.GetScaledSize(ImageSize);
+ int dy = (int)Math.Round((float)(r.Height - scaledY) / 2);
if (Application.RenderWithVisualStyles)
{
VisualStyleRenderer renderer;
@@ -62,7 +66,7 @@ public override void Draw(TreeNodeAdv node, DrawContext context)
renderer = OpenedRenderer;
else
renderer = ClosedRenderer;
- renderer.DrawBackground(context.Graphics, new Rectangle(r.X, r.Y + dy, ImageSize, ImageSize));
+ renderer.DrawBackground(context.Graphics, new Rectangle(r.X, r.Y + dy, scaledX, scaledY));
}
else
{
diff --git a/External/Aga.Controls/Tree/TreeViewAdv.Draw.cs b/External/Aga.Controls/Tree/TreeViewAdv.Draw.cs
index a5c9b9bd6..a512213e3 100644
--- a/External/Aga.Controls/Tree/TreeViewAdv.Draw.cs
+++ b/External/Aga.Controls/Tree/TreeViewAdv.Draw.cs
@@ -259,8 +259,9 @@ private void DrawLines(Graphics gr, TreeNodeAdv node, Rectangle rowRect)
while (curNode != _root && curNode != null)
{
int level = curNode.Level;
- int x = (level - 1) * _indent + NodePlusMinus.ImageSize / 2 + LeftMargin;
- int width = NodePlusMinus.Width - NodePlusMinus.ImageSize / 2;
+ int scaledIndent = node.Tree.GetScaledSize(_indent, false);
+ int x = (level - 1) * scaledIndent + NodePlusMinus.ImageSize / 2 + LeftMargin;
+ int width = node.Tree.GetScaledSize(NodePlusMinus.Width - NodePlusMinus.ImageSize / 2, false);
int y = rowRect.Y;
int y2 = y + rowRect.Height;
diff --git a/External/Aga.Controls/Tree/TreeViewAdv.cs b/External/Aga.Controls/Tree/TreeViewAdv.cs
index 18f5e3e33..6c26fc154 100644
--- a/External/Aga.Controls/Tree/TreeViewAdv.cs
+++ b/External/Aga.Controls/Tree/TreeViewAdv.cs
@@ -42,6 +42,11 @@ public partial class TreeViewAdv : Control
private List _expandingNodes = new List();
private AbortableThreadPool _threadPool = new AbortableThreadPool();
+ private float dpiX;
+ private float dpiY;
+ private float dpiXscale = 1;
+ private float dpiYscale = 1;
+
#region Public Events
[Category("Action")]
@@ -204,6 +209,7 @@ protected virtual void OnDropNodeValidating(Point point, ref TreeNodeAdv node)
public TreeViewAdv()
{
InitializeComponent();
+ SetDPI();
SetStyle(ControlStyles.AllPaintingInWmPaint
| ControlStyles.UserPaint
| ControlStyles.OptimizedDoubleBuffer
@@ -216,6 +222,7 @@ public TreeViewAdv()
_columnHeaderHeight = 20;
else
_columnHeaderHeight = 17;
+ _columnHeaderHeight = GetScaledSize(_columnHeaderHeight);
//BorderStyle = BorderStyle.Fixed3D;
_hScrollBar.Height = SystemInformation.HorizontalScrollBarHeight;
@@ -245,6 +252,46 @@ public TreeViewAdv()
ExpandingIcon.IconChanged += ExpandingIconChanged;
}
+ public void SetDPI()
+ {
+ // https://msdn.microsoft.com/en-us/library/windows/desktop/dn469266(v=vs.85).aspx
+ const int _default_dpi = 96;
+ Graphics g = this.CreateGraphics();
+
+ try
+ {
+ this.dpiX = g.DpiX;
+ this.dpiY = g.DpiY;
+ }
+ finally
+ {
+ g.Dispose();
+ }
+ if (dpiX > 0)
+ {
+ this.dpiXscale = dpiX / _default_dpi;
+ }
+ if (dpiY > 0)
+ {
+ this.dpiYscale = dpiY / _default_dpi;
+ }
+ }
+
+ public int GetScaledSize(int size, bool useY = true)
+ {
+ int scaledsize = size;
+
+ if (useY && this.dpiYscale > 1)
+ {
+ scaledsize = (int)(this.dpiYscale * size);
+ }
+ else if (this.dpiXscale > 1)
+ {
+ scaledsize = (int)(this.dpiXscale * size);
+ }
+ return scaledsize;
+ }
+
void ExpandingIconChanged(object sender, EventArgs e)
{
if (IsHandleCreated && !IsDisposed)
@@ -543,11 +590,12 @@ internal IEnumerable GetNodeControls(TreeNodeAdv node, Rectangl
if (node == null)
yield break;
+ int scaledIndent = node.Tree.GetScaledSize(_indent, false);
int y = rowRect.Y;
- int x = (node.Level - 1) * _indent + LeftMargin;
+ int x = (node.Level - 1) * scaledIndent + LeftMargin;
int width = 0;
if (node.Row == 0 && ShiftFirstNode)
- x -= _indent;
+ x -= scaledIndent;
Rectangle rect = Rectangle.Empty;
if (ShowPlusMinus)
diff --git a/External/OxyPlot.WindowsForms.dll b/External/OxyPlot.WindowsForms.dll
deleted file mode 100644
index 4d9a6dca2..000000000
Binary files a/External/OxyPlot.WindowsForms.dll and /dev/null differ
diff --git a/External/OxyPlot.dll b/External/OxyPlot.dll
deleted file mode 100644
index db6f80c3b..000000000
Binary files a/External/OxyPlot.dll and /dev/null differ
diff --git a/Hardware/CPU/AMD10CPU.cs b/Hardware/CPU/AMD10CPU.cs
index fb0378ac5..7d919db4b 100644
--- a/Hardware/CPU/AMD10CPU.cs
+++ b/Hardware/CPU/AMD10CPU.cs
@@ -38,12 +38,16 @@ internal sealed class AMD10CPU : AMDCPU {
private const ushort FAMILY_15H_MODEL_00_MISC_CONTROL_DEVICE_ID = 0x1603;
private const ushort FAMILY_15H_MODEL_10_MISC_CONTROL_DEVICE_ID = 0x1403;
private const ushort FAMILY_15H_MODEL_30_MISC_CONTROL_DEVICE_ID = 0x141D;
+ private const ushort FAMILY_15H_MODEL_60_MISC_CONTROL_DEVICE_ID = 0x1573;
private const ushort FAMILY_16H_MODEL_00_MISC_CONTROL_DEVICE_ID = 0x1533;
private const ushort FAMILY_16H_MODEL_30_MISC_CONTROL_DEVICE_ID = 0x1583;
+ private const ushort FAMILY_17H_MODEL_00_MISC_CONTROL_DEVICE_ID = 0x1577;
private const uint REPORTED_TEMPERATURE_CONTROL_REGISTER = 0xA4;
private const uint CLOCK_POWER_TIMING_CONTROL_0_REGISTER = 0xD4;
+ private const uint F15H_M60H_REPORTED_TEMP_CTRL_OFFSET = 0xD8200CA4;
+
private readonly uint miscellaneousControlAddress;
private readonly ushort miscellaneousControlDeviceId;
@@ -79,6 +83,8 @@ public AMD10CPU(int processorIndex, CPUID[][] cpuid, ISettings settings)
FAMILY_15H_MODEL_10_MISC_CONTROL_DEVICE_ID; break;
case 0x30: miscellaneousControlDeviceId =
FAMILY_15H_MODEL_30_MISC_CONTROL_DEVICE_ID; break;
+ case 0x60: miscellaneousControlDeviceId =
+ FAMILY_15H_MODEL_60_MISC_CONTROL_DEVICE_ID; break;
default: miscellaneousControlDeviceId = 0; break;
} break;
case 0x16:
@@ -89,6 +95,8 @@ public AMD10CPU(int processorIndex, CPUID[][] cpuid, ISettings settings)
FAMILY_16H_MODEL_30_MISC_CONTROL_DEVICE_ID; break;
default: miscellaneousControlDeviceId = 0; break;
} break;
+ case 0x17: miscellaneousControlDeviceId =
+ FAMILY_17H_MODEL_00_MISC_CONTROL_DEVICE_ID; break;
default: miscellaneousControlDeviceId = 0; break;
}
@@ -304,6 +312,15 @@ public override void Update() {
if (temperatureStream == null) {
if (miscellaneousControlAddress != Ring0.InvalidPciAddress) {
uint value;
+ if (miscellaneousControlAddress == FAMILY_15H_MODEL_60_MISC_CONTROL_DEVICE_ID) {
+ value = F15H_M60H_REPORTED_TEMP_CTRL_OFFSET;
+ Ring0.WritePciConfig(Ring0.GetPciAddress(0, 0, 0), 0xB8, value);
+ Ring0.ReadPciConfig(Ring0.GetPciAddress(0, 0, 0), 0xBC, out value);
+ coreTemperature.Value = ((value >> 21) & 0x7FF) * 0.125f +
+ coreTemperature.Parameters[0].Value;
+ ActivateSensor(coreTemperature);
+ return;
+ }
if (Ring0.ReadPciConfig(miscellaneousControlAddress,
REPORTED_TEMPERATURE_CONTROL_REGISTER, out value)) {
if (family == 0x15 && (value & 0x30000) == 0x30000) {
diff --git a/Hardware/CPU/CPUGroup.cs b/Hardware/CPU/CPUGroup.cs
index 742955008..98829d264 100644
--- a/Hardware/CPU/CPUGroup.cs
+++ b/Hardware/CPU/CPUGroup.cs
@@ -102,6 +102,7 @@ public CPUGroup(ISettings settings) {
case 0x14:
case 0x15:
case 0x16:
+ case 0x17:
hardware.Add(new AMD10CPU(index, coreThreads, settings));
break;
default:
diff --git a/Hardware/CPU/IntelCPU.cs b/Hardware/CPU/IntelCPU.cs
index 60ae587e8..8f3eb3b9f 100644
--- a/Hardware/CPU/IntelCPU.cs
+++ b/Hardware/CPU/IntelCPU.cs
@@ -28,7 +28,8 @@ private enum Microarchitecture {
Silvermont,
Skylake,
Airmont,
- KabyLake
+ KabyLake,
+ ApolloLake
}
private readonly Sensor[] coreTemperatures;
@@ -183,6 +184,10 @@ public IntelCPU(int processorIndex, CPUID[][] cpuid, ISettings settings)
microarchitecture = Microarchitecture.KabyLake;
tjMax = GetTjMaxFromMSR();
break;
+ case 0x5C: // Intel ApolloLake
+ microarchitecture = Microarchitecture.ApolloLake;
+ tjMax = GetTjMaxFromMSR();
+ break;
default:
microarchitecture = Microarchitecture.Unknown;
tjMax = Floats(100);
@@ -231,6 +236,7 @@ public IntelCPU(int processorIndex, CPUID[][] cpuid, ISettings settings)
case Microarchitecture.Silvermont:
case Microarchitecture.Skylake:
case Microarchitecture.Airmont:
+ case Microarchitecture.ApolloLake:
case Microarchitecture.KabyLake: {
uint eax, edx;
if (Ring0.Rdmsr(MSR_PLATFORM_INFO, out eax, out edx)) {
@@ -295,7 +301,8 @@ public IntelCPU(int processorIndex, CPUID[][] cpuid, ISettings settings)
microarchitecture == Microarchitecture.Skylake ||
microarchitecture == Microarchitecture.Silvermont ||
microarchitecture == Microarchitecture.Airmont ||
- microarchitecture == Microarchitecture.KabyLake)
+ microarchitecture == Microarchitecture.KabyLake ||
+ microarchitecture == Microarchitecture.ApolloLake)
{
powerSensors = new Sensor[energyStatusMSRs.Length];
lastEnergyTime = new DateTime[energyStatusMSRs.Length];
@@ -413,6 +420,7 @@ public override void Update() {
case Microarchitecture.Broadwell:
case Microarchitecture.Silvermont:
case Microarchitecture.Skylake:
+ case Microarchitecture.ApolloLake:
case Microarchitecture.KabyLake: {
uint multiplier = (eax >> 8) & 0xff;
coreClocks[i].Value = (float)(multiplier * newBusClock);
diff --git a/Hardware/LPC/Chip.cs b/Hardware/LPC/Chip.cs
index a184c90cf..4fe8cfef8 100644
--- a/Hardware/LPC/Chip.cs
+++ b/Hardware/LPC/Chip.cs
@@ -27,6 +27,7 @@ internal enum Chip : ushort {
IT8620E = 0x8620,
IT8628E = 0x8628,
+ IT8686E = 0x8686,
IT8705F = 0x8705,
IT8712F = 0x8712,
IT8716F = 0x8716,
@@ -43,6 +44,8 @@ internal enum Chip : ushort {
NCT610X = 0xC452,
NCT6779D = 0xC560,
NCT6791D = 0xC803,
+ NCT6793D = 0xD121,
+ NCT6795D = 0xD352,
NCT6796D = 0xD423,
W83627DHG = 0xA020,
@@ -75,6 +78,7 @@ public static string GetName(Chip chip) {
case Chip.IT8620E: return "ITE IT8620E";
case Chip.IT8628E: return "ITE IT8628E";
+ case Chip.IT8686E: return "ITE IT8686E";
case Chip.IT8705F: return "ITE IT8705F";
case Chip.IT8712F: return "ITE IT8712F";
case Chip.IT8716F: return "ITE IT8716F";
@@ -92,6 +96,8 @@ public static string GetName(Chip chip) {
case Chip.NCT6776F: return "Nuvoton NCT6776F";
case Chip.NCT6779D: return "Nuvoton NCT6779D";
case Chip.NCT6791D: return "Nuvoton NCT6791D";
+ case Chip.NCT6793D: return "Nuvoton NCT6793D";
+ case Chip.NCT6795D: return "Nuvoton NCT6795D";
case Chip.NCT6796D: return "Nuvoton NCT6796D";
case Chip.W83627DHG: return "Winbond W83627DHG";
diff --git a/Hardware/LPC/IT87XX.cs b/Hardware/LPC/IT87XX.cs
index 1ff580827..7d95902e3 100644
--- a/Hardware/LPC/IT87XX.cs
+++ b/Hardware/LPC/IT87XX.cs
@@ -32,7 +32,8 @@ internal class IT87XX : ISuperIO {
private readonly float voltageGain;
private readonly bool has16bitFanCounter;
-
+ private readonly bool hasNewerAutopwm;
+
// Consts
private const byte ITE_VENDOR_ID = 0x90;
@@ -51,9 +52,11 @@ internal class IT87XX : ISuperIO {
{ 0x18, 0x19, 0x1a, 0x81, 0x83 };
private const byte VOLTAGE_BASE_REG = 0x20;
private readonly byte[] FAN_PWM_CTRL_REG = { 0x15, 0x16, 0x17 };
+ private readonly byte[] FAN_PWM_DUTY_REG = { 0x63, 0x6b, 0x73 };
private bool[] restoreDefaultFanPwmControlRequired = new bool[3];
private byte[] initialFanPwmControl = new byte[3];
+ private byte[] initialFanPwmControlMode = new byte[3];
private byte ReadByte(byte register, out bool valid) {
Ring0.WriteIoPort(addressReg, register);
@@ -84,17 +87,38 @@ public void WriteGPIO(int index, byte value) {
private void SaveDefaultFanPwmControl(int index) {
bool valid;
- if (!restoreDefaultFanPwmControlRequired[index]) {
- initialFanPwmControl[index] =
- ReadByte(FAN_PWM_CTRL_REG[index], out valid);
- restoreDefaultFanPwmControlRequired[index] = true;
+ if (hasNewerAutopwm) {
+ if (!restoreDefaultFanPwmControlRequired[index]) {
+ initialFanPwmControlMode[index] =
+ ReadByte(FAN_PWM_CTRL_REG[index], out valid);
+
+ initialFanPwmControl[index] =
+ ReadByte(FAN_PWM_DUTY_REG[index], out valid);
+ }
}
+ else {
+ if (!restoreDefaultFanPwmControlRequired[index]) {
+ initialFanPwmControl[index] =
+ ReadByte(FAN_PWM_CTRL_REG[index], out valid);
+ }
+ }
+
+ restoreDefaultFanPwmControlRequired[index] = true;
}
private void RestoreDefaultFanPwmControl(int index) {
- if (restoreDefaultFanPwmControlRequired[index]) {
- WriteByte(FAN_PWM_CTRL_REG[index], initialFanPwmControl[index]);
- restoreDefaultFanPwmControlRequired[index] = false;
+ if (hasNewerAutopwm) {
+ if (restoreDefaultFanPwmControlRequired[index]) {
+ WriteByte(FAN_PWM_CTRL_REG[index], initialFanPwmControlMode[index]);
+ WriteByte(FAN_PWM_DUTY_REG[index], initialFanPwmControl[index]);
+ restoreDefaultFanPwmControlRequired[index] = false;
+ }
+ }
+ else {
+ if (restoreDefaultFanPwmControlRequired[index]) {
+ WriteByte(FAN_PWM_CTRL_REG[index], initialFanPwmControl[index]);
+ restoreDefaultFanPwmControlRequired[index] = false;
+ }
}
}
@@ -108,14 +132,33 @@ public void SetControl(int index, byte? value) {
if (value.HasValue) {
SaveDefaultFanPwmControl(index);
- // set output value
- WriteByte(FAN_PWM_CTRL_REG[index], (byte)(value.Value >> 1));
- } else {
+ if (hasNewerAutopwm) {
+ bool valid = false;
+ byte ctrlValue = ReadByte(FAN_PWM_CTRL_REG[index], out valid);
+
+ if (valid) {
+ bool isOnAutoControl = (ctrlValue & (1 << 7)) > 0;
+ if (isOnAutoControl) {
+ // Set to manual speed control
+ ctrlValue &= byte.MaxValue ^ (1 << 7);
+ WriteByte(FAN_PWM_CTRL_REG[index], ctrlValue);
+ }
+ }
+
+ // set speed
+ WriteByte(FAN_PWM_DUTY_REG[index], value.Value);
+ }
+ else {
+ // set output value
+ WriteByte(FAN_PWM_CTRL_REG[index], (byte)((value.Value >> 1)));
+ }
+ }
+ else {
RestoreDefaultFanPwmControl(index);
}
Ring0.ReleaseIsaBusMutex();
- }
+ }
public IT87XX(Chip chip, ushort address, ushort gpioAddress, byte version) {
@@ -138,15 +181,26 @@ public IT87XX(Chip chip, ushort address, ushort gpioAddress, byte version) {
if (!valid)
return;
- voltages = new float?[9];
- temperatures = new float?[3];
- fans = new float?[chip == Chip.IT8705F ? 3 : 5];
- controls = new float?[3];
+ // IT8686E has more sensors
+ if(chip == Chip.IT8686E)
+ {
+ voltages = new float?[10];
+ temperatures = new float?[5];
+ fans = new float?[5];
+ controls = new float?[3];
+ }
+ else
+ {
+ voltages = new float?[9];
+ temperatures = new float?[3];
+ fans = new float?[chip == Chip.IT8705F ? 3 : 5];
+ controls = new float?[3];
+ }
- // IT8620E, IT8628E, IT8721F, IT8728F and IT8772E use a 12mV resultion
+ // IT8620E, IT8628E, IT8721F, IT8728F, IT8772E and IT8686E use a 12mV resultion
// ADC, all others 16mV
if (chip == Chip.IT8620E || chip == Chip.IT8628E || chip == Chip.IT8721F
- || chip == Chip.IT8728F || chip == Chip.IT8771E || chip == Chip.IT8772E)
+ || chip == Chip.IT8728F || chip == Chip.IT8771E || chip == Chip.IT8772E || chip == Chip.IT8686E)
{
voltageGain = 0.012f;
} else {
@@ -162,6 +216,10 @@ public IT87XX(Chip chip, ushort address, ushort gpioAddress, byte version) {
has16bitFanCounter = true;
}
+ if(chip == Chip.IT8620E) {
+ hasNewerAutopwm = true;
+ }
+
// Set the number of GPIO sets
switch (chip) {
case Chip.IT8712F:
@@ -313,17 +371,38 @@ public void Update() {
}
for (int i = 0; i < controls.Length; i++) {
- bool valid;
- byte value = ReadByte(FAN_PWM_CTRL_REG[i], out valid);
- if (!valid)
- continue;
+ if (hasNewerAutopwm) {
+ bool valid;
+ byte value = ReadByte(FAN_PWM_DUTY_REG[i], out valid);
+ if (!valid)
+ continue;
+
+ byte ctrlValue = ReadByte(FAN_PWM_CTRL_REG[i], out valid);
+ if (!valid)
+ continue;
+
+ if ((ctrlValue & 0x80) > 0) {
+ // automatic operation (value can't be read)
+ controls[i] = null;
+ }
+ else {
+ controls[i] = (float)Math.Round((value) * 100.0f / 0xFF);
+ }
+ }
+ else {
+ bool valid;
+ byte value = ReadByte(FAN_PWM_CTRL_REG[i], out valid);
+ if (!valid)
+ continue;
- if ((value & 0x80) > 0) {
- // automatic operation (value can't be read)
- controls[i] = null;
- } else {
- // software operation
- controls[i] = (float)Math.Round((value & 0x7F) * 100.0f / 0x7F);
+ if ((value & 0x80) > 0) {
+ // automatic operation (value can't be read)
+ controls[i] = null;
+ }
+ else {
+ // software operation
+ controls[i] = (float)Math.Round((value & 0x7F) * 100.0f / 0x7F);
+ }
}
}
diff --git a/Hardware/LPC/LMSensors.cs b/Hardware/LPC/LMSensors.cs
index c101bedab..677a809ee 100755
--- a/Hardware/LPC/LMSensors.cs
+++ b/Hardware/LPC/LMSensors.cs
@@ -73,6 +73,10 @@ public LMSensors() {
lmChips.Add(new LMChip(Chip.NCT6779D, path)); break;
case "nct6791":
lmChips.Add(new LMChip(Chip.NCT6791D, path)); break;
+ case "nct6793":
+ lmChips.Add(new LMChip(Chip.NCT6793D, path)); break;
+ case "nct6795":
+ lmChips.Add(new LMChip(Chip.NCT6795D, path)); break;
case "nct6796":
lmChips.Add(new LMChip(Chip.NCT6796D, path)); break;
diff --git a/Hardware/LPC/LPCIO.cs b/Hardware/LPC/LPCIO.cs
index e029614e2..65b71b676 100644
--- a/Hardware/LPC/LPCIO.cs
+++ b/Hardware/LPC/LPCIO.cs
@@ -215,6 +215,20 @@ private bool DetectWinbondFintek(LPCPort port) {
chip = Chip.NCT6796D;
logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
break;
+ } break;
+ case 0xD1:
+ switch (revision) {
+ case 0x21:
+ chip = Chip.NCT6793D;
+ logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
+ break;
+ } break;
+ case 0xD3:
+ switch (revision) {
+ case 0x52:
+ chip = Chip.NCT6795D;
+ logicalDeviceNumber = WINBOND_NUVOTON_HARDWARE_MONITOR_LDN;
+ break;
} break;
}
if (chip == Chip.Unknown) {
@@ -232,9 +246,9 @@ private bool DetectWinbondFintek(LPCPort port) {
ushort verify = port.ReadWord(BASE_ADDRESS_REGISTER);
ushort vendorID = port.ReadWord(FINTEK_VENDOR_ID_REGISTER);
-
- // disable the hardware monitor i/o space lock on NCT6791D chips
- if (address == verify && (chip == Chip.NCT6791D || chip == Chip.NCT6796D)) {
+
+ // disable the hardware monitor i/o space lock on NCT679*D chips
+ if (address == verify && (chip == Chip.NCT6791D || chip == Chip.NCT6796D || chip == Chip.NCT6793D || chip == Chip.NCT6795D)) {
port.NuvotonDisableIOSpaceLock();
}
@@ -285,6 +299,8 @@ private bool DetectWinbondFintek(LPCPort port) {
case Chip.NCT6779D:
case Chip.NCT6791D:
case Chip.NCT6796D:
+ case Chip.NCT6793D:
+ case Chip.NCT6795D:
superIOs.Add(new NCT677X(chip, revision, address, port));
break;
case Chip.F71858:
@@ -341,6 +357,7 @@ private bool DetectIT87(LPCPort port) {
switch (chipID) {
case 0x8620: chip = Chip.IT8620E; break;
case 0x8628: chip = Chip.IT8628E; break;
+ case 0x8686: chip = Chip.IT8686E; break;
case 0x8705: chip = Chip.IT8705F; break;
case 0x8712: chip = Chip.IT8712F; break;
case 0x8716: chip = Chip.IT8716F; break;
diff --git a/Hardware/LPC/NCT677X.cs b/Hardware/LPC/NCT677X.cs
index ae90b5897..3339681ff 100644
--- a/Hardware/LPC/NCT677X.cs
+++ b/Hardware/LPC/NCT677X.cs
@@ -271,6 +271,8 @@ public NCT677X(Chip chip, byte revision, ushort port, LPCPort lpcPort)
break;
case Chip.NCT6779D:
+ case Chip.NCT6795D:
+ case Chip.NCT6793D:
case Chip.NCT6791D:
case Chip.NCT6796D:
if (chip == Chip.NCT6779D) {
@@ -415,7 +417,7 @@ public void SetControl(int index, byte? value) {
public float?[] Controls { get { return controls; } }
private void DisableIOSpaceLock() {
- if (chip != Chip.NCT6791D && chip != Chip.NCT6796D)
+ if (chip != Chip.NCT6791D && chip != Chip.NCT6796D && chip != Chip.NCT6793D && chip != Chip.NCT6795D)
return;
// the lock is disabled already if the vendor ID can be read
diff --git a/Hardware/Mainboard/Identification.cs b/Hardware/Mainboard/Identification.cs
index 6ed16c5b0..99177d26f 100644
--- a/Hardware/Mainboard/Identification.cs
+++ b/Hardware/Mainboard/Identification.cs
@@ -93,6 +93,7 @@ public static Model GetModel(string name) {
case "P6X58D-E":
return Model.P6X58D_E;
case "P8P67":
+ case "P8P67 REV 3.1":
return Model.P8P67;
case "P8P67 EVO":
return Model.P8P67_EVO;
@@ -180,6 +181,8 @@ public static Model GetModel(string name) {
return Model.X38_DS5;
case "X58A-UD3R":
return Model.X58A_UD3R;
+ case "X79-UD3":
+ return Model.X79_UD3;
case "Z68A-D3H-B3":
return Model.Z68A_D3H_B3;
case "Z68AP-D3":
@@ -190,6 +193,8 @@ public static Model GetModel(string name) {
return Model.Z68X_UD7_B3;
case "FH67":
return Model.FH67;
+ case "AX370-Gaming K7":
+ return Model.AX370_K7;
case "Base Board Product Name":
case "To be filled by O.E.M.":
return Model.Unknown;
diff --git a/Hardware/Mainboard/Model.cs b/Hardware/Mainboard/Model.cs
index 4db709f97..109efa0af 100644
--- a/Hardware/Mainboard/Model.cs
+++ b/Hardware/Mainboard/Model.cs
@@ -75,10 +75,12 @@ internal enum Model {
P8Z68_V_PRO,
X38_DS5,
X58A_UD3R,
+ X79_UD3,
Z68A_D3H_B3,
Z68AP_D3,
Z68X_UD3H_B3,
Z68X_UD7_B3,
+ AX370_K7,
// Shuttle
FH67,
diff --git a/Hardware/Mainboard/SuperIOHardware.cs b/Hardware/Mainboard/SuperIOHardware.cs
index 39afeacca..dc1736a46 100644
--- a/Hardware/Mainboard/SuperIOHardware.cs
+++ b/Hardware/Mainboard/SuperIOHardware.cs
@@ -182,6 +182,7 @@ private static void GetBoardSpecificConfiguration(ISuperIO superIO,
case Chip.IT8718F:
case Chip.IT8720F:
case Chip.IT8726F:
+ case Chip.IT8686E:
GetITEConfigurationsA(superIO, manufacturer, model, v, t, f, c,
ref readFan, ref postUpdate, ref mutex);
break;
@@ -267,6 +268,8 @@ private static void GetBoardSpecificConfiguration(ISuperIO superIO,
case Chip.NCT6779D:
case Chip.NCT6791D:
case Chip.NCT6796D:
+ case Chip.NCT6793D:
+ case Chip.NCT6795D:
GetNuvotonConfigurationD(superIO, manufacturer, model, v, t, f, c);
break;
default:
@@ -603,6 +606,26 @@ private static void GetITEConfigurationsA(ISuperIO superIO,
f.Add(new Fan("Power Fan", 2));
f.Add(new Fan("System Fan #1", 3));
break;
+ case Model.AX370_K7: // IT8686E
+ // Note: v3.3, v12, v5, and AVCC3 might be slightly off.
+ v.Add(new Voltage("CPU VCore", 0));
+ v.Add(new Voltage("+3.3V", 1, 0.65f, 1));
+ v.Add(new Voltage("+12V", 2, 5, 1));
+ v.Add(new Voltage("+5V", 3, 1.5f, 1));
+ v.Add(new Voltage("VSOC", 4));
+ v.Add(new Voltage("VDDP", 5));
+ v.Add(new Voltage("VDRAM", 6));
+ v.Add(new Voltage("3VSB", 7, 10, 10));
+ v.Add(new Voltage("VBAT", 8, 10, 10));
+ v.Add(new Voltage("AVCC3", 9, 7.53f, 1));
+ t.Add(new Temperature("System", 0));
+ t.Add(new Temperature("Chipset", 1));
+ t.Add(new Temperature("CPU", 2));
+ t.Add(new Temperature("PCIEX16", 3));
+ t.Add(new Temperature("VRM MOS", 4));
+ for (int i = 0; i < superIO.Fans.Length; i++)
+ f.Add(new Fan("Fan #" + (i + 1), i));
+ break;
default:
v.Add(new Voltage("CPU VCore", 0));
v.Add(new Voltage("DRAM", 1, true));
@@ -832,6 +855,24 @@ private static void GetITEConfigurationsB(ISuperIO superIO,
f.Add(new Fan("System Fan #2", 3));
f.Add(new Fan("System Fan #3", 4));
break;
+ case Model.X79_UD3: // IT8728F
+ v.Add(new Voltage("VTT", 0));
+ v.Add(new Voltage("DIMM CH A/B", 1));
+ v.Add(new Voltage("+12V", 2, 10, 2));
+ v.Add(new Voltage("+5V", 3, 15, 10));
+ v.Add(new Voltage("VIN4", 4));
+ v.Add(new Voltage("VCore", 5));
+ v.Add(new Voltage("DIMM CH C/D", 6));
+ v.Add(new Voltage("+3V Standby", 7, 1, 1));
+ v.Add(new Voltage("VBat", 8, 1, 1));
+ t.Add(new Temperature("System", 0));
+ t.Add(new Temperature("CPU", 1));
+ t.Add(new Temperature("Northbridge", 2));
+ f.Add(new Fan("CPU Fan", 0));
+ f.Add(new Fan("System Fan #1", 1));
+ f.Add(new Fan("System Fan #2", 2));
+ f.Add(new Fan("System Fan #3", 3));
+ break;
default:
v.Add(new Voltage("Voltage #1", 0, true));
v.Add(new Voltage("Voltage #2", 1, true));
diff --git a/OpenHardwareMonitor.csproj b/OpenHardwareMonitor.csproj
index 35e749bd8..6dff957f1 100644
--- a/OpenHardwareMonitor.csproj
+++ b/OpenHardwareMonitor.csproj
@@ -58,22 +58,12 @@
AllRules.ruleset
-
- External\OxyPlot.dll
-
-
- External\OxyPlot.WindowsForms.dll
-
-
- False
- External\Aga.Controls.dll
-
@@ -209,6 +199,18 @@
+
+ {e73bb233-d88b-44a7-a98f-d71ee158381d}
+ Aga.Controls
+
+
+ {d4554296-094e-4cac-8eae-44eb250666c6}
+ OxyPlot.WindowsForms
+
+
+ {bcc43e58-e473-403e-a84d-63fedc723040}
+ OxyPlot
+
{B0397530-545A-471D-BB74-027AE456DF1A}
OpenHardwareMonitorLib
@@ -301,7 +303,6 @@
- copy "$(ProjectDir)External\*.*" "$(TargetDir)"
-copy "$(ProjectDir)Licenses\*.*" "$(TargetDir)"
+
-
\ No newline at end of file
+
diff --git a/OpenHardwareMonitor.sln b/OpenHardwareMonitor.sln
index 121b566ef..e9bc64360 100644
--- a/OpenHardwareMonitor.sln
+++ b/OpenHardwareMonitor.sln
@@ -8,6 +8,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenHardwareMonitor", "Open
{B0397530-545A-471D-BB74-027AE456DF1A} = {B0397530-545A-471D-BB74-027AE456DF1A}
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aga.Controls", "External\Aga.Controls\Aga.Controls.csproj", "{E73BB233-D88B-44A7-A98F-D71EE158381D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OxyPlot", "External\OxyPlot\OxyPlot\OxyPlot.csproj", "{BCC43E58-E473-403E-A84D-63FEDC723040}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OxyPlot.WindowsForms", "External\OxyPlot\OxyPlot.WindowsForms\OxyPlot.WindowsForms.csproj", "{D4554296-094E-4CAC-8EAE-44EB250666C6}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -22,6 +28,18 @@ Global
{F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E73BB233-D88B-44A7-A98F-D71EE158381D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E73BB233-D88B-44A7-A98F-D71EE158381D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E73BB233-D88B-44A7-A98F-D71EE158381D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E73BB233-D88B-44A7-A98F-D71EE158381D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BCC43E58-E473-403E-A84D-63FEDC723040}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BCC43E58-E473-403E-A84D-63FEDC723040}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BCC43E58-E473-403E-A84D-63FEDC723040}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BCC43E58-E473-403E-A84D-63FEDC723040}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D4554296-094E-4CAC-8EAE-44EB250666C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D4554296-094E-4CAC-8EAE-44EB250666C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D4554296-094E-4CAC-8EAE-44EB250666C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D4554296-094E-4CAC-8EAE-44EB250666C6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Properties/AssemblyLibInfo.cs b/Properties/AssemblyLibInfo.cs
index 376e4cf57..aaec71539 100644
--- a/Properties/AssemblyLibInfo.cs
+++ b/Properties/AssemblyLibInfo.cs
@@ -10,6 +10,7 @@ This Source Code Form is subject to the terms of the Mozilla Public
using System;
using System.Reflection;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Open Hardware Monitor Library")]
@@ -24,3 +25,4 @@ This Source Code Form is subject to the terms of the Mozilla Public
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]
+
diff --git a/README.md b/README.md
new file mode 100644
index 000000000..326ac24c2
--- /dev/null
+++ b/README.md
@@ -0,0 +1,6 @@
+# LibreHardwareMonitor
+[](https://ci.appveyor.com/project/LibreHardwareMonitor/librehardwaremonitor)
+
+Libre Hardware Monitor, home of the fork of Open Hardware Monitor
+
+We will happily accept pull requests.
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 000000000..1e0198d80
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,7 @@
+image: Visual Studio 2015
+
+build:
+ project: OpenHardwareMonitor.sln
+
+artifacts:
+ - path: 'Bin\Debug\'