Fixed Issue 14 (ignore ATI GPU voltage and clock sensors if the value is 0).
authormoel.mich
Wed, 10 Mar 2010 17:56:08 +0000
changeset 80129a9a1d514f
parent 79 9cdbe1d8d12a
child 81 7f4079703ab0
Fixed Issue 14 (ignore ATI GPU voltage and clock sensors if the value is 0).
Hardware/ATI/ATIGPU.cs
     1.1 --- a/Hardware/ATI/ATIGPU.cs	Tue Mar 09 22:27:10 2010 +0000
     1.2 +++ b/Hardware/ATI/ATIGPU.cs	Wed Mar 10 17:56:08 2010 +0000
     1.3 @@ -123,13 +123,22 @@
     1.4        if (ADL.ADL_Overdrive5_CurrentActivity_Get(adapterIndex, ref adlp)
     1.5          == ADL.ADL_OK) 
     1.6        {
     1.7 -        coreClock.Value = 0.01f * adlp.EngineClock;
     1.8 -        memoryClock.Value = 0.01f * adlp.MemoryClock;
     1.9 -        coreVoltage.Value = 0.001f * adlp.Vddc;
    1.10 -        coreLoad.Value = adlp.ActivityPercent;
    1.11 -        ActivateSensor(coreClock);
    1.12 -        ActivateSensor(memoryClock);
    1.13 -        ActivateSensor(coreVoltage);
    1.14 +        if (adlp.EngineClock > 0) {
    1.15 +          coreClock.Value = 0.01f * adlp.EngineClock;
    1.16 +          ActivateSensor(coreClock);
    1.17 +        }
    1.18 +
    1.19 +        if (adlp.MemoryClock > 0) {
    1.20 +          memoryClock.Value = 0.01f * adlp.MemoryClock;
    1.21 +          ActivateSensor(memoryClock);
    1.22 +        }
    1.23 +
    1.24 +        if (adlp.Vddc > 0) {
    1.25 +          coreVoltage.Value = 0.001f * adlp.Vddc;
    1.26 +          ActivateSensor(coreVoltage);
    1.27 +        }
    1.28 +
    1.29 +        coreLoad.Value = adlp.ActivityPercent;                        
    1.30          ActivateSensor(coreLoad);
    1.31        } else {
    1.32          DeactivateSensor(coreClock);