File tree Expand file tree Collapse file tree
Utils/OpenHardwareMonitor Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33using BitPoolMiner . Persistence . API ;
44using BitPoolMiner . Process ;
55using System ;
6- using System . Collections . Generic ;
76using System . Collections . ObjectModel ;
87using System . Linq ;
9- using BitPoolMiner . Utils ;
108
119// This is the Miner base class.
1210
@@ -131,7 +129,11 @@ private MinerMonitorStat SupplementMinerMonitorStatData(MinerMonitorStat stats)
131129 // Iterate through each GPUMonitorStat and add missing data
132130 foreach ( GPUMonitorStat gpuMonitorStat in stats . GPUMonitorStatList )
133131 {
134- gpuMonitorStat . FanSpeed = gpuSettingsList . Where ( x => x . GPUID == gpuMonitorStat . GPUID ) . FirstOrDefault ( ) . Fanspeed ;
132+ if ( gpuMonitorStat . FanSpeed == 0 )
133+ gpuMonitorStat . FanSpeed = gpuSettingsList . Where ( x => x . GPUID == gpuMonitorStat . GPUID ) . FirstOrDefault ( ) . Fanspeed ;
134+
135+ if ( gpuMonitorStat . Temp == 0 )
136+ gpuMonitorStat . Temp = gpuSettingsList . Where ( x => x . GPUID == gpuMonitorStat . GPUID ) . FirstOrDefault ( ) . Temp ;
135137 }
136138 }
137139 catch ( Exception )
@@ -152,7 +154,7 @@ private bool CheckMinerMonitorStatDataMissing(MinerMonitorStat stats)
152154 {
153155 bool IsDataMissing = false ;
154156
155- foreach ( GPUMonitorStat gpuMonitorStat in stats . GPUMonitorStatList )
157+ foreach ( GPUMonitorStat gpuMonitorStat in stats . GPUMonitorStatList )
156158 {
157159 // Check if FanSpeed is showing 0
158160 if ( gpuMonitorStat . FanSpeed == 0 )
Original file line number Diff line number Diff line change @@ -75,6 +75,11 @@ public CoinType CoinSelectedForMining
7575 /// </summary>
7676 public Int16 Fanspeed { get ; set ; }
7777
78+ /// <summary>
79+ /// GPU Temp
80+ /// </summary>
81+ public Int16 Temp { get ; set ; }
82+
7883 /// <summary>
7984 /// Limit Coin's to be mined based on hardware type
8085 /// </summary>
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public ObservableCollection<GPUSettings> ScanHardware()
3535 gpuSettings . WorkerName = Application . Current . Properties [ "WorkerName" ] . ToString ( ) ;
3636 gpuSettings . HardwareName = hardwareItem . Name ;
3737 gpuSettings . EnabledForMining = true ;
38-
38+
3939 try
4040 {
4141 gpuSettings . Fanspeed = Convert . ToInt16 ( hardwareItem . Sensors . Where ( x => x . SensorType == SensorType . Control && x . Name == "GPU Fan" ) . FirstOrDefault ( ) . Value ) ;
@@ -45,6 +45,15 @@ public ObservableCollection<GPUSettings> ScanHardware()
4545 gpuSettings . Fanspeed = 0 ;
4646 }
4747
48+ try
49+ {
50+ gpuSettings . Temp = Convert . ToInt16 ( hardwareItem . Sensors . Where ( x => x . SensorType == SensorType . Temperature ) . FirstOrDefault ( ) . Value ) ;
51+ }
52+ catch
53+ {
54+ gpuSettings . Temp = 0 ;
55+ }
56+
4857 gpuSettings . EnabledForMining = true ;
4958
5059 if ( hardwareItem . HardwareType == HardwareType . GpuNvidia )
You can’t perform that action at this time.
0 commit comments