Use incompatible hwmon for battery in the unlikely event the hwmon still has the correct name. version to alpha2
This commit is contained in:
parent
64cb4193f9
commit
b7cf8b8caf
8 changed files with 6 additions and 8 deletions
2
backend/Cargo.lock
generated
2
backend/Cargo.lock
generated
|
@ -1043,7 +1043,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "powertools"
|
||||
version = "1.4.0-alpha"
|
||||
version = "1.4.0-alpha2"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"libryzenadj",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "powertools"
|
||||
version = "1.4.0-alpha"
|
||||
version = "1.4.0-alpha2"
|
||||
edition = "2021"
|
||||
authors = ["NGnius (Graham) <ngniusness@gmail.com>"]
|
||||
description = "Backend (superuser) functionality for PowerTools"
|
||||
|
|
|
@ -279,12 +279,10 @@ impl Battery {
|
|||
let root = crate::settings::util::root_or_default_sysfs(root);
|
||||
match root.hwmon_by_name(super::util::JUPITER_HWMON_NAME) {
|
||||
Ok(hwmon) => {
|
||||
if hwmon.capable(attributes(HWMON_NEEDS.into_iter().copied())) {
|
||||
hwmon
|
||||
} else {
|
||||
log::error!("Failed to find SteamDeck battery hwmon in sysfs (hwmon by name {} exists but missing attributes), using naive fallback", super::util::JUPITER_HWMON_NAME);
|
||||
root.hwmon_by_index(5)
|
||||
if !hwmon.capable(attributes(HWMON_NEEDS.into_iter().copied())) {
|
||||
log::warn!("Found incapable SteamDeck battery hwmon in sysfs (hwmon by name {} exists but missing attributes), persevering because ignorance is bliss", super::util::JUPITER_HWMON_NAME);
|
||||
}
|
||||
hwmon
|
||||
},
|
||||
Err(e) => {
|
||||
log::error!("Failed to find SteamDeck battery hwmon in sysfs ({}), using naive fallback", e);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "PowerTools",
|
||||
"version": "1.4.0-alpha",
|
||||
"version": "1.4.0-alpha2",
|
||||
"description": "Power tweaks for power users",
|
||||
"scripts": {
|
||||
"build": "shx rm -rf dist && rollup -c",
|
||||
|
|
Binary file not shown.
Binary file not shown.
BIN
translations/ru-RU.mo
Normal file
BIN
translations/ru-RU.mo
Normal file
Binary file not shown.
BIN
translations/uk-UA.mo
Normal file
BIN
translations/uk-UA.mo
Normal file
Binary file not shown.
Loading…
Reference in a new issue