Пример #1
0
        public ATIGPU(string name, int adapterIndex, int busNumber, int deviceNumber, ISettings settings)
            : base(name, new Identifier("atigpu", adapterIndex.ToString(CultureInfo.InvariantCulture)), settings)
        {
            this.adapterIndex = adapterIndex;
            this.busNumber    = busNumber;
            this.deviceNumber = deviceNumber;

            this.temperature   = new Sensor("GPU Core", 0, SensorType.Temperature, this, settings);
            this.fan           = new Sensor("GPU Fan", 0, SensorType.Fan, this, settings);
            this.coreClock     = new Sensor("GPU Core", 0, SensorType.Clock, this, settings);
            this.memoryClock   = new Sensor("GPU Memory", 1, SensorType.Clock, this, settings);
            this.coreVoltage   = new Sensor("GPU Core", 0, SensorType.Voltage, this, settings);
            this.coreLoad      = new Sensor("GPU Core", 0, SensorType.Load, this, settings);
            this.controlSensor = new Sensor("GPU Fan", 0, SensorType.Control, this, settings);

            ADLOD6ThermalControllerCaps adltcc = new ADLOD6ThermalControllerCaps();

            if (ADL.ADL_Overdrive6_ThermalController_Caps(adapterIndex, ref adltcc) != ADL.ADL_OK)
            {
                adltcc.iFanMinPercent = 0;
                adltcc.iFanMaxPercent = 100;
            }

            this.fanControl = new Control(controlSensor, settings, adltcc.iFanMinPercent, adltcc.iFanMaxPercent);
            this.fanControl.ControlModeChanged          += ControlModeChanged;
            this.fanControl.SoftwareControlValueChanged += SoftwareControlValueChanged;
            ControlModeChanged(fanControl);
            this.controlSensor.Control = fanControl;
            Update();
        }