From d7f2ebd4ba10fabfa5420ae9743ac08771036e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=B6ller?= Date: Thu, 28 Jan 2010 19:31:10 +0000 Subject: [PATCH] Fixed 5th fan channel for IT87 chips. Added ADL status code to report. --- Hardware/ATI/ADL.cs | 2 +- Hardware/ATI/ATIGroup.cs | 19 ++++++++++++++----- Hardware/LPC/IT87.cs | 2 +- Properties/AssemblyInfo.cs | 2 +- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Hardware/ATI/ADL.cs b/Hardware/ATI/ADL.cs index 55fa916..a4bc72c 100644 --- a/Hardware/ATI/ADL.cs +++ b/Hardware/ATI/ADL.cs @@ -109,7 +109,7 @@ namespace OpenHardwareMonitor.Hardware.ATI { public const int ADL_MAX_ADAPTERS = 40; public const int ADL_MAX_DISPLAYS = 40; public const int ADL_MAX_DEVICENAME = 32; - public const int ADL_SUCCESS = 0; + public const int ADL_OK = 0; public const int ADL_FAIL = -1; public const int ADL_DRIVER_OK = 0; public const int ADL_MAX_GLSYNC_PORTS = 8; diff --git a/Hardware/ATI/ATIGroup.cs b/Hardware/ATI/ATIGroup.cs index cc57bc1..d0750d3 100644 --- a/Hardware/ATI/ATIGroup.cs +++ b/Hardware/ATI/ATIGroup.cs @@ -47,19 +47,28 @@ namespace OpenHardwareMonitor.Hardware.ATI { public ATIGroup() { try { - if (ADL.ADL_Main_Control_Create(1) == ADL.ADL_SUCCESS) { + int status = ADL.ADL_Main_Control_Create(1); + + report.AppendLine("AMD Display Library"); + report.AppendLine(); + report.Append("Status: "); + if (status == ADL.ADL_OK) + report.AppendLine("OK"); + else + report.AppendLine(status.ToString()); + report.AppendLine(); + + if (status == ADL.ADL_OK) { int numberOfAdapters = 0; ADL.ADL_Adapter_NumberOfAdapters_Get(ref numberOfAdapters); - - report.AppendLine("AMD Display Library"); - report.AppendLine(); + report.Append("Numer of adapters: "); report.AppendLine(numberOfAdapters.ToString()); report.AppendLine(); if (numberOfAdapters > 0) { ADLAdapterInfo[] adapterInfo = new ADLAdapterInfo[numberOfAdapters]; - if (ADL.ADL_Adapter_AdapterInfo_Get(adapterInfo) == ADL.ADL_SUCCESS) + if (ADL.ADL_Adapter_AdapterInfo_Get(adapterInfo) == ADL.ADL_OK) for (int i = 0; i < numberOfAdapters; i++) { int isActive; ADL.ADL_Adapter_Active_Get(adapterInfo[i].AdapterIndex, diff --git a/Hardware/LPC/IT87.cs b/Hardware/LPC/IT87.cs index b8724b3..5eecff3 100644 --- a/Hardware/LPC/IT87.cs +++ b/Hardware/LPC/IT87.cs @@ -109,7 +109,7 @@ namespace OpenHardwareMonitor.Hardware.LPC { temperatures[i] = new Sensor("Temperature #" + (i + 1), i, SensorType.Temperature, this); - fans = new Sensor[4]; + fans = new Sensor[5]; for (int i = 0; i < fans.Length; i++) fans[i] = new Sensor("Fan #" + (i + 1), i, SensorType.Fan, this); diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 02110f1..1532dda 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -33,4 +33,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.1.1.0")] -[assembly: AssemblyFileVersion("0.1.0.0")] +[assembly: AssemblyFileVersion("0.1.1.0")]