Added fan speed percentage

This commit is contained in:
Ilya Zlobintsev
2020-10-25 13:01:50 +02:00
parent 2e90d54686
commit e958bebfe0
3 changed files with 5 additions and 2 deletions

View File

@@ -50,6 +50,7 @@ pub struct GpuInfo {
pub link_speed: String,
pub link_width: u8,
pub vulkan_info: VulkanInfo,
pub max_fan_speed: i32,
}
impl GpuController {
@@ -150,6 +151,7 @@ impl GpuController {
let vulkan_info = GpuController::get_vulkan_info(&model_id);
let max_fan_speed = self.hw_mon.fan_max_speed;
GpuInfo {
gpu_vendor: vendor,
@@ -164,6 +166,7 @@ impl GpuController {
link_speed,
link_width,
vulkan_info,
max_fan_speed,
}
}

View File

@@ -10,7 +10,7 @@ pub enum HWMonError {
#[derive(Debug, Clone)]
pub struct HWMon {
hwmon_path: PathBuf,
fan_max_speed: i32,
pub fan_max_speed: i32,
fan_control: Arc<AtomicBool>,
fan_curve: Arc<RwLock<BTreeMap<i32, f64>>>,
}