Merge branch 'main' into decky
This commit is contained in:
commit
e464203d9d
2 changed files with 9 additions and 5 deletions
|
@ -54,11 +54,13 @@ pub fn find_hwmon<P: AsRef<std::path::Path>>(path: P) -> HwMonPath {
|
|||
syspath.hwmon_by_index(HWMON_INDEX)
|
||||
},
|
||||
Ok(mut iter) => {
|
||||
iter.next()
|
||||
let entity = iter.next()
|
||||
.unwrap_or_else(|| {
|
||||
log::error!("sysfs hwmon iter empty: [no capable results]");
|
||||
syspath.hwmon_by_index(HWMON_INDEX)
|
||||
})
|
||||
});
|
||||
log::info!("Found fan hwmon {}", entity.as_ref().display());
|
||||
entity
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -73,11 +75,13 @@ pub fn find_thermal_zone<P: AsRef<std::path::Path>>(path: P) -> BasicEntityPath
|
|||
BasicEntityPath::new("/sys/class/thermal/thermal_zone0")
|
||||
},
|
||||
Ok(mut iter) => {
|
||||
iter.next()
|
||||
let entity = iter.next()
|
||||
.unwrap_or_else(|| {
|
||||
log::error!("sysfs thermal class iter empty: [no capable results]");
|
||||
BasicEntityPath::new("/sys/class/thermal/thermal_zone0")
|
||||
})
|
||||
});
|
||||
log::info!("Found thermal zone {}", entity.as_ref().display());
|
||||
entity
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"publish": {
|
||||
"discord_id": "106537989684887552",
|
||||
"description": "Fan controls",
|
||||
"tags": [ "utility", "fan-control" ],
|
||||
"tags": [ "utility", "fan-control", "root" ],
|
||||
"image": "https://raw.githubusercontent.com/NGnius/Fantastic/main/assets/thumbnail.png"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue