Fixed 5th fan channel for IT87 chips. Added ADL status code to report.

This commit is contained in:
Michael Möller 2010-01-28 19:31:10 +00:00
parent cf85bde358
commit d7f2ebd4ba
4 changed files with 17 additions and 8 deletions

View File

@ -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;

View File

@ -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,

View File

@ -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);

View File

@ -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")]