mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-08-29 13:28:04 +00:00
Fixed 5th fan channel for IT87 chips. Added ADL status code to report.
This commit is contained in:
parent
cf85bde358
commit
d7f2ebd4ba
@ -109,7 +109,7 @@ namespace OpenHardwareMonitor.Hardware.ATI {
|
|||||||
public const int ADL_MAX_ADAPTERS = 40;
|
public const int ADL_MAX_ADAPTERS = 40;
|
||||||
public const int ADL_MAX_DISPLAYS = 40;
|
public const int ADL_MAX_DISPLAYS = 40;
|
||||||
public const int ADL_MAX_DEVICENAME = 32;
|
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_FAIL = -1;
|
||||||
public const int ADL_DRIVER_OK = 0;
|
public const int ADL_DRIVER_OK = 0;
|
||||||
public const int ADL_MAX_GLSYNC_PORTS = 8;
|
public const int ADL_MAX_GLSYNC_PORTS = 8;
|
||||||
|
@ -47,19 +47,28 @@ namespace OpenHardwareMonitor.Hardware.ATI {
|
|||||||
|
|
||||||
public ATIGroup() {
|
public ATIGroup() {
|
||||||
try {
|
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;
|
int numberOfAdapters = 0;
|
||||||
ADL.ADL_Adapter_NumberOfAdapters_Get(ref numberOfAdapters);
|
ADL.ADL_Adapter_NumberOfAdapters_Get(ref numberOfAdapters);
|
||||||
|
|
||||||
report.AppendLine("AMD Display Library");
|
|
||||||
report.AppendLine();
|
|
||||||
report.Append("Numer of adapters: ");
|
report.Append("Numer of adapters: ");
|
||||||
report.AppendLine(numberOfAdapters.ToString());
|
report.AppendLine(numberOfAdapters.ToString());
|
||||||
report.AppendLine();
|
report.AppendLine();
|
||||||
|
|
||||||
if (numberOfAdapters > 0) {
|
if (numberOfAdapters > 0) {
|
||||||
ADLAdapterInfo[] adapterInfo = new ADLAdapterInfo[numberOfAdapters];
|
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++) {
|
for (int i = 0; i < numberOfAdapters; i++) {
|
||||||
int isActive;
|
int isActive;
|
||||||
ADL.ADL_Adapter_Active_Get(adapterInfo[i].AdapterIndex,
|
ADL.ADL_Adapter_Active_Get(adapterInfo[i].AdapterIndex,
|
||||||
|
@ -109,7 +109,7 @@ namespace OpenHardwareMonitor.Hardware.LPC {
|
|||||||
temperatures[i] = new Sensor("Temperature #" + (i + 1), i,
|
temperatures[i] = new Sensor("Temperature #" + (i + 1), i,
|
||||||
SensorType.Temperature, this);
|
SensorType.Temperature, this);
|
||||||
|
|
||||||
fans = new Sensor[4];
|
fans = new Sensor[5];
|
||||||
for (int i = 0; i < fans.Length; i++)
|
for (int i = 0; i < fans.Length; i++)
|
||||||
fans[i] = new Sensor("Fan #" + (i + 1), i, SensorType.Fan, this);
|
fans[i] = new Sensor("Fan #" + (i + 1), i, SensorType.Fan, this);
|
||||||
|
|
||||||
|
@ -33,4 +33,4 @@ using System.Runtime.InteropServices;
|
|||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("0.1.1.0")]
|
[assembly: AssemblyVersion("0.1.1.0")]
|
||||||
[assembly: AssemblyFileVersion("0.1.0.0")]
|
[assembly: AssemblyFileVersion("0.1.1.0")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user