forked from NG-SD-Plugins/PowerTools
Fix loading battery settings from json, update some deps
This commit is contained in:
parent
2f8c0a0172
commit
533beaf289
3 changed files with 15 additions and 15 deletions
20
backend/Cargo.lock
generated
20
backend/Cargo.lock
generated
|
@ -85,7 +85,7 @@ checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.12",
|
"syn 2.0.13",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -96,7 +96,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.12",
|
"syn 2.0.13",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -330,7 +330,7 @@ dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"scratch",
|
"scratch",
|
||||||
"syn 2.0.12",
|
"syn 2.0.13",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -347,7 +347,7 @@ checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.12",
|
"syn 2.0.13",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1086,9 +1086,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.54"
|
version = "1.0.55"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e472a104799c74b514a57226160104aa483546de37e839ec50e3c2e41dd87534"
|
checksum = "1d0dd4be24fcdcfeaa12a432d588dc59bbad6cad3510c67e74a2b6b2fc950564"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
@ -1199,7 +1199,7 @@ checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.12",
|
"syn 2.0.13",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1291,9 +1291,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.12"
|
version = "2.0.13"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "79d9531f94112cfc3e4c8f5f02cb2b58f72c97b7efd85f70203cc6d8efda5927"
|
checksum = "4c9da457c5285ac1f936ebd076af6dac17a61cfe7826f2076b4d015cf47bc8ec"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -1326,7 +1326,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.12",
|
"syn 2.0.13",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -10,7 +10,7 @@ mkdir -p out
|
||||||
echo "--- Building ryzenadj lib ---"
|
echo "--- Building ryzenadj lib ---"
|
||||||
git clone https://github.com/FlyGoat/RyzenAdj ryzenadj
|
git clone https://github.com/FlyGoat/RyzenAdj ryzenadj
|
||||||
cd ryzenadj
|
cd ryzenadj
|
||||||
git checkout -q 187549bd0a92f84508161aabfd958b09540c7e56
|
git checkout -q 160502771054d31d2f4c2fa46ad42c96336f3a74
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||||
make
|
make
|
||||||
|
|
|
@ -93,18 +93,18 @@ impl EventInstruction {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn str_to_trigger(s: &str) -> Option<EventTrigger> {
|
fn str_to_trigger(s: &str) -> Option<EventTrigger> {
|
||||||
match s {
|
match s {
|
||||||
"normal" => Some(EventTrigger::PluggedIn),
|
"plug-in" => Some(EventTrigger::PluggedIn),
|
||||||
"idle" => Some(EventTrigger::PluggedOut),
|
"plug-out" => Some(EventTrigger::PluggedOut),
|
||||||
s if s.starts_with('>') => s
|
s if s.starts_with('>') => s
|
||||||
.trim_start_matches('>')
|
.trim_start_matches('>')
|
||||||
.parse::<f64>()
|
.parse::<f64>()
|
||||||
.ok()
|
.ok()
|
||||||
.map(|x| EventTrigger::BatteryAbove(x)),
|
.map(|x| EventTrigger::BatteryAbove(x/100.0)),
|
||||||
s if s.starts_with('<') => s
|
s if s.starts_with('<') => s
|
||||||
.trim_start_matches('<')
|
.trim_start_matches('<')
|
||||||
.parse::<f64>()
|
.parse::<f64>()
|
||||||
.ok()
|
.ok()
|
||||||
.map(|x| EventTrigger::BatteryBelow(x)),
|
.map(|x| EventTrigger::BatteryBelow(x/100.0)),
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue