Cleanup sys config

This commit is contained in:
Luke D. Jones
2024-05-10 10:02:22 +12:00
parent 1b1d10c461
commit e62e7e8eca
6 changed files with 34 additions and 104 deletions

View File

@@ -60,13 +60,12 @@ impl AsusPower {
info!("Found a battery");
if battery.is_none() {
info!("Checking battery attributes");
if device
.attribute_value("charge_control_end_threshold")
.is_some()
if let Some(current) =
device.attribute_value("charge_control_end_threshold")
{
info!(
"Found battery power at {:?}, matched \
charge_control_end_threshold",
charge_control_end_threshold. Current level: {current:?}",
device.sysname()
);
battery = Some(device.syspath().to_path_buf());