Fixes: Handle keyboard nodes better.

- Uses string instead of debug print for some errors
- Add interface num arg for LED controller (should help support
  older laptops better)
- Some slightly better error messages
- Fix an idiotic mistake in `for i in 0..2.. if i > 0` -_-
- Remove "unsupported" warning on laptop ctrl
- Silence warning about AniMe not existing
- Adjust the turbo-toggle CLI arg
- Version bump for new release with fancurves

Closes #7 #10 #8 #4
This commit is contained in:
Luke D Jones
2020-09-10 10:43:08 +12:00
parent 1b427c6c07
commit cddff32757
13 changed files with 143 additions and 126 deletions

View File

@@ -34,7 +34,7 @@ impl crate::Controller for CtrlCharge {
while let Some(n) = recv.recv().await {
let mut config = config.lock().await;
self.set_charge_limit(n, &mut config)
.unwrap_or_else(|err| warn!("charge_limit: {:?}", err));
.unwrap_or_else(|err| warn!("charge_limit: {}", err));
}
})]
}
@@ -80,11 +80,11 @@ impl CtrlCharge {
.write(true)
.open(self.path)
.map_err(|err| {
warn!("Failed to open battery charge limit path: {:?}", err);
warn!("Failed to open battery charge limit path: {}", err);
err
})?;
file.write_all(limit.to_string().as_bytes())
.unwrap_or_else(|err| error!("Could not write to {}, {:?}", BAT_CHARGE_PATH, err));
.unwrap_or_else(|err| error!("Could not write to {}, {}", BAT_CHARGE_PATH, err));
info!("Battery charge limit: {}", limit);
config.read();