Example #1
0
        public static void UpdateState(this IGpu gpu, OverClockRange range)
        {
            gpu.CoreClockDeltaMin = range.CoreClockMin;
            gpu.CoreClockDeltaMax = range.CoreClockMax;
            gpu.CoreClockDelta    = range.CoreClockDelta;
            gpu.CoreVoltage       = range.CoreVoltage;

            gpu.MemoryClockDeltaMin      = range.MemoryClockMin;
            gpu.MemoryClockDeltaMax      = range.MemoryClockMax;
            gpu.MemoryClockDelta         = range.MemoryClockDelta;
            gpu.MemoryVoltage            = range.MemoryVoltage;
            gpu.CurrentMemoryTimingLevel = range.CurrentMemoryTimingLevel;

            gpu.TempLimitMin     = range.TempLimitMin;
            gpu.TempLimitMax     = range.TempLimitMax;
            gpu.TempLimit        = range.TempCurr;
            gpu.TempLimitDefault = range.TempLimitDefault;

            gpu.PowerMin      = range.PowerMin;
            gpu.PowerMax      = range.PowerMax;
            gpu.PowerCapacity = range.PowerCurr;
            gpu.PowerDefault  = range.PowerDefault;

            gpu.CoolMin = range.FanSpeedMin;
            gpu.CoolMax = range.FanSpeedMax;

            gpu.VoltMin = range.VoltMin;
            gpu.VoltMax = range.VoltMax;
            NTMinerContext.Instance.GpuSet.LoadGpuState(gpu.Index);
        }
Example #2
0
 public void RefreshGpuState(IGpu gpu)
 {
     if (gpu.Index == NTMinerRoot.GpuAllId)
     {
         return;
     }
     try {
         OverClockRange range = _gpuHelper.GetClockRange(gpu.GetOverClockId());
         gpu.UpdateState(range);
     }
     catch (System.Exception e) {
         Logger.ErrorDebugLine(e);
     }
     VirtualRoot.Happened(new GpuStateChangedEvent(gpu));
 }
Example #3
0
 public void RefreshGpuState(IGpu gpu)
 {
     if (gpu.Index == NTMinerContext.GpuAllId)
     {
         return;
     }
     try {
         OverClockRange range = _gpuHelper.GetClockRange(gpu);
         gpu.UpdateState(range);
     }
     catch (Exception e) {
         Logger.ErrorDebugLine(e);
     }
     VirtualRoot.RaiseEvent(new GpuStateChangedEvent(Guid.Empty, gpu));
 }
Example #4
0
        public static void UpdateState(this IGpu gpu, OverClockRange range)
        {
            if (range.CoreClockMin != 0)
            {
                gpu.CoreClockDeltaMin = range.CoreClockMin;
            }
            if (range.CoreClockMax != 0)
            {
                gpu.CoreClockDeltaMax = range.CoreClockMax;
            }
            if (range.CoreClockDelta != 0)
            {
                gpu.CoreClockDelta = range.CoreClockDelta;
            }
            if (range.CoreVoltage != 0)
            {
                gpu.CoreVoltage = range.CoreVoltage;
            }

            if (range.MemoryClockMin != 0)
            {
                gpu.MemoryClockDeltaMin = range.MemoryClockMin;
            }
            if (range.MemoryClockMax != 0)
            {
                gpu.MemoryClockDeltaMax = range.MemoryClockMax;
            }
            if (range.MemoryClockDelta != 0)
            {
                gpu.MemoryClockDelta = range.MemoryClockDelta;
            }
            if (range.MemoryVoltage != 0)
            {
                gpu.MemoryVoltage = range.MemoryVoltage;
            }

            if (range.TempLimitMin != 0)
            {
                gpu.TempLimitMin = range.TempLimitMin;
            }
            if (range.TempLimitMax != 0)
            {
                gpu.TempLimitMax = range.TempLimitMax;
            }
            if (range.TempCurr != 0)
            {
                gpu.TempLimit = range.TempCurr;
            }
            if (range.TempLimitDefault != 0)
            {
                gpu.TempLimitDefault = range.TempLimitDefault;
            }

            if (range.PowerMin != 0)
            {
                gpu.PowerMin = range.PowerMin;
            }
            if (range.PowerMax != 0)
            {
                gpu.PowerMax = range.PowerMax;
            }
            if (range.PowerCurr != 0)
            {
                gpu.PowerCapacity = range.PowerCurr;
            }
            if (range.PowerDefault != 0)
            {
                gpu.PowerDefault = range.PowerDefault;
            }

            if (range.FanSpeedMin != 0)
            {
                gpu.CoolMin = range.FanSpeedMin;
            }
            if (range.FanSpeedMax != 0)
            {
                gpu.CoolMax = range.FanSpeedMax;
            }
            if (range.FanSpeedDefault != 0)
            {
                // 无默认风扇转速
            }
            NTMinerRoot.Instance.GpuSet.LoadGpuState(gpu.Index);
        }